Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Code generation problem #24

@RobDangerous

Description

@RobDangerous

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions