Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shdr: can not convert from 'const mediump float' to 'FragColor mediump 4-component vector of float' #4

Open
SonarSoundProgramming opened this issue Aug 24, 2013 · 1 comment

Comments

@SonarSoundProgramming
Copy link

This issue I have shows up all the time on code that should be able to compile correctly. I don't know why every time when i try to pass a vec4 function to the gl_FragColor I get this. Is the gl_FragColor not supposed to be a vec4? From my understanding it was. It is a rather annoying problem. I love the UI and everything. The models look fantastic but I need to be able to pass vec4's to the fragment as it is just common shader sense. It also happens with "vec2 uv = gl_TexCoord[0].st". can not convert from 'float' to '2-component vector of float'

@BKcore
Copy link
Owner

BKcore commented Aug 24, 2013

Shdr's compiler/validator is the standard chrome ESSL compiler, all Shdr is doing is parsing the error to display it in a better way.
If your shader does not compile in Shdr, it means that chrome's ESSL compiler won't compile it either, and there is nothing I can do about that.

Please make sure your code is valid.

Also, a link to a problematic shader would help. (Hit the Share button in Shdr)

-T

On Aug 24, 2013, at 9:16 AM, SonarSoundProgramming [email protected] wrote:

This issue I have shows up all the time on code that should be able to compile correctly. I don't know why every time when i try to pass a vec4 function to the gl_FragColor I get this. Is the gl_FragColor not supposed to be a vec4? From my understanding it was. It is a rather annoying problem. I love the UI and everything. The models look fantastic but I need to be able to pass vec4's to the fragment as it is just common shader sense. It also happens with "vec2 uv = gl_TexCoord[0].st". can not convert from 'float' to '2-component vector of float'


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants