mirror of https://github.com/bjornbytes/lovr.git
rm pointSize from Material;
It's weird, and about as inconvenient as just putting it in the shader.
This commit is contained in:
parent
0a599ccdd6
commit
7e5221492d
|
@ -43,7 +43,6 @@ layout(set = 1, binding = 0) uniform MaterialBuffer {
|
|||
float occlusionStrength;
|
||||
float normalScale;
|
||||
float alphaCutoff;
|
||||
float pointSize;
|
||||
} Material;
|
||||
|
||||
layout(set = 1, binding = 1) uniform texture2D ColorTexture;
|
||||
|
@ -272,7 +271,7 @@ void main() {
|
|||
Color = VertexColor * Material.color * PassColor;
|
||||
UV = VertexUV;
|
||||
|
||||
PointSize = Material.pointSize;
|
||||
PointSize = 1.f;
|
||||
Position = lovrmain();
|
||||
|
||||
if (enableUVTransform) {
|
||||
|
|
|
@ -609,7 +609,6 @@ static int l_lovrModelDataGetMaterial(lua_State* L) {
|
|||
lua_pushnumber(L, material->occlusionStrength), lua_setfield(L, -2, "occlusionStrength");
|
||||
lua_pushnumber(L, material->normalScale), lua_setfield(L, -2, "normalScale");
|
||||
lua_pushnumber(L, material->alphaCutoff), lua_setfield(L, -2, "alphaCutoff");
|
||||
lua_pushnumber(L, material->pointSize), lua_setfield(L, -2, "pointSize");
|
||||
|
||||
#define PUSH_IMAGE(t) if (material->t != ~0u) luax_pushtype(L, Image, model->images[material->t]), lua_setfield(L, -2, #t)
|
||||
PUSH_IMAGE(texture);
|
||||
|
|
|
@ -1363,10 +1363,6 @@ static int l_lovrGraphicsNewMaterial(lua_State* L) {
|
|||
info.data.alphaCutoff = luax_optfloat(L, -1, 0.f);
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_getfield(L, 1, "pointSize");
|
||||
info.data.pointSize = luax_optfloat(L, -1, 1.f);
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_getfield(L, 1, "texture");
|
||||
info.texture = luax_opttexture(L, -1);
|
||||
lua_pop(L, 1);
|
||||
|
|
|
@ -52,7 +52,6 @@ static int l_lovrMaterialGetProperties(lua_State* L) {
|
|||
lua_pushnumber(L, info->data.occlusionStrength), lua_setfield(L, -2, "occlusionStrength");
|
||||
lua_pushnumber(L, info->data.normalScale), lua_setfield(L, -2, "normalScale");
|
||||
lua_pushnumber(L, info->data.alphaCutoff), lua_setfield(L, -2, "alphaCutoff");
|
||||
lua_pushnumber(L, info->data.pointSize), lua_setfield(L, -2, "pointSize");
|
||||
luax_pushtype(L, Texture, info->texture), lua_setfield(L, -2, "texture");
|
||||
luax_pushtype(L, Texture, info->glowTexture), lua_setfield(L, -2, "glowTexture");
|
||||
luax_pushtype(L, Texture, info->occlusionTexture), lua_setfield(L, -2, "occlusionTexture");
|
||||
|
|
|
@ -86,7 +86,6 @@ typedef struct {
|
|||
float occlusionStrength;
|
||||
float normalScale;
|
||||
float alphaCutoff;
|
||||
float pointSize;
|
||||
uint32_t texture;
|
||||
uint32_t glowTexture;
|
||||
uint32_t occlusionTexture;
|
||||
|
|
|
@ -707,7 +707,6 @@ ModelData* lovrModelDataInitGltf(ModelData* model, Blob* source, ModelDataIO* io
|
|||
material->occlusionStrength = 1.f;
|
||||
material->normalScale = 1.f;
|
||||
material->alphaCutoff = 0.f;
|
||||
material->pointSize = 1.f;
|
||||
material->texture = ~0u;
|
||||
material->glowTexture = ~0u;
|
||||
material->occlusionTexture = ~0u;
|
||||
|
|
|
@ -58,7 +58,6 @@ static void parseMtl(char* path, char* base, ModelDataIO* io, arr_image_t* image
|
|||
.occlusionStrength = 1.f,
|
||||
.normalScale = 1.f,
|
||||
.alphaCutoff = 0.f,
|
||||
.pointSize = 1.f,
|
||||
.texture = ~0u,
|
||||
.glowTexture = ~0u,
|
||||
.occlusionTexture = ~0u,
|
||||
|
|
|
@ -332,7 +332,6 @@ typedef struct {
|
|||
float occlusionStrength;
|
||||
float normalScale;
|
||||
float alphaCutoff;
|
||||
float pointSize;
|
||||
} MaterialData;
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Reference in New Issue