forked from aras-p/glsl-optimizer
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
This glsl code:
#version 100
attribute vec3 vertexPosition;
attribute vec2 texPosition;
uniform mat4 projectionMatrix;
varying vec2 texCoord;
void main() {
gl_Position = projectionMatrix * vec4(vertexPosition, 1.0);
texCoord = texPosition;
gl_Position.z = 0.5;
}Generates this agal:
mov vt0.w, vc0.x
mov vt0.xyz, va0.xyzz
mov v0, vc0
mov v0.xy, va1.xyyy
m44 op, vt0, vc1
mov op, vc0
mov op.z, vc0.y
and these const fields:
"consts": {
"vc0": [
1,
0.5,
0,
0
]
}
The mov op, vc0 instruction (second last) does not seem to make any sense at all. After removing it the shader works as intended.
Metadata
Metadata
Assignees
Labels
No labels