X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=tests%2Fglsl%2Fconstructors.glsl;h=fe7ca48ab65513ad9e2ce42eec42c0be40bddbc4;hb=HEAD;hp=ddb1dceae6f1c811bf8fde17cf3a0a9e1db8f314;hpb=8f2713a3f1501e90016bb8069ecd08dde2f90e56;p=libs%2Fgl.git diff --git a/tests/glsl/constructors.glsl b/tests/glsl/constructors.glsl index ddb1dcea..151ee5ef 100644 --- a/tests/glsl/constructors.glsl +++ b/tests/glsl/constructors.glsl @@ -26,6 +26,8 @@ void main() frag_color = vec4(vec3(dot(normal, normalize(tbn_light_dir))), 1); } +// Target API: OpenGL + /* Expected output: vertex layout(location=0) uniform mat4 model; layout(location=4) uniform mat4 view_projection; @@ -41,8 +43,9 @@ void main() { mat3 normal_matrix = mat3(model[0].xyz, model[1].xyz, model[2].xyz); tbn_light_dir = mat3(normal_matrix*tangent, normal_matrix*binormal, normal_matrix*normal)*light_dir; - gl_Position = view_projection*model*vec4(position, float(1)); + gl_Position = view_projection*model*vec4(position, 1.0); _vs_out_texcoord = texcoord; + gl_Position.z = gl_Position.z*2.0-gl_Position.w; } */ @@ -53,6 +56,6 @@ layout(location=1) in vec2 _vs_out_texcoord; layout(location=0) in vec3 tbn_light_dir; void main() { - frag_color = vec4(vec3(dot(vec3(texture(normalmap, _vs_out_texcoord).xyz)*2.0-1.0, normalize(tbn_light_dir))), float(1)); + frag_color = vec4(vec3(dot(vec3(texture(normalmap, _vs_out_texcoord).xyz)*2.0-1.0, normalize(tbn_light_dir))), 1.0); } */