Commit 67dffa0a authored by Jan Möbius's avatar Jan Möbius

Merge branch 'shader_errors' into 'master'

fix glsl errors

See merge request !2
parents c9a6b795 452c948d
......@@ -33,7 +33,7 @@ void main()
gl_PointSize = max(viewportScaleFov_y * ecPointsize / gl_Position.w, 1.0);
// use generated SG_OUTPUT variables to do backface culling
if (backfaceCulling && dot(SG_OUTPUT_POSVS, SG_OUTPUT_NORMALVS) > 0.0)
if (backfaceCulling && dot(SG_OUTPUT_POSVS.xyz, SG_OUTPUT_NORMALVS) > 0.0)
{
// discard vertex
gl_Position.w = 0.0;
......
......@@ -23,7 +23,7 @@ void main()
SG_VERTEX_END;
// use generated SG_OUTPUT variables to do backface culling
if (backfaceCulling && dot(SG_OUTPUT_POSVS, SG_OUTPUT_NORMALVS) > 0.0)
if (backfaceCulling && dot(SG_OUTPUT_POSVS.xyz, SG_OUTPUT_NORMALVS) > 0.0)
{
// discard vertex
gl_Position.w = 0.0;
......
......@@ -57,7 +57,7 @@ void main()
// use generated SG_OUTPUT variables to do backface culling
if (backfaceCulling && dot(SG_OUTPUT_POSVS, SG_OUTPUT_NORMALVS) > 0.0)
if (backfaceCulling && dot(SG_OUTPUT_POSVS.xyz, SG_OUTPUT_NORMALVS) > 0.0)
{
// discard vertex
gl_Position.w = 0.0;
......
......@@ -19,20 +19,17 @@ void main()
vec4 centerVS = SG_INPUT_POSVS[0];
// point size
float pointSize = v2g_pointSize[0].x;
float pointSize = v2g_pointSize[0];
// create normal-aligned quad
vec3 offsetX = v2g_tangentVS[0] * pointSize;
vec3 offsetY = v2g_bitangentVS[0] * pointSize;
// offset factors for the quad vertices
vec2 posQS[4] =
{
vec2(-1, 1),
vec2 posQS[4] = vec2[4](vec2(-1, 1),
vec2(-1, -1),
vec2(1, 1),
vec2(1, -1)
};
vec2(1, -1));
for (int i = 0; i < 4; ++i)
{
......
......@@ -49,7 +49,7 @@ void main()
v2g_pointSize = modelviewScale * pointsizeScale * splatPointSize * 0.5;
// use generated SG_OUTPUT variables to do backface culling
if (backfaceCulling && dot(SG_OUTPUT_POSVS, SG_OUTPUT_NORMALVS) > 0.0)
if (backfaceCulling && dot(SG_OUTPUT_POSVS.xyz, SG_OUTPUT_NORMALVS) > 0.0)
{
// discard vertex
gl_Position.w = 0.0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment