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

No way to pass custom variables between Vertex and Fragment Shader #3268

Closed
Krzycho666 opened this issue Jan 7, 2016 · 5 comments
Closed

Comments

@Krzycho666
Copy link
Contributor

Since godot shading language is quite limited in some cases, there is no way to pass custom variables between Vertex and Fragment Shader. There are predefined variables VAR1 and VAR2 ( which are vec4, but it's only two of them.
This makes writing optimized shaders impossible, since most of the calculations should be made in Vertex shader - but there is no way to pass them forward to Fragment one. Also arrays would make life a lot easier too.

@reduz
Copy link
Member

reduz commented Jan 10, 2016

problem is that old mobile devices can't do more than that. This will likely be fixed in the migration to GLES3

@reduz reduz added this to the 3.0 milestone Jan 10, 2016
@Krzycho666
Copy link
Contributor Author

Wow. Seriously? "Attribute" and "varying" qualifiers are not supported on all devices with GLES2? It sounds quite odd to me. I'm not sure if we should care about it, since most likely it's just a couple of outdated and exotic devices. Besides this is a GLES2.0 core functionality - so as many other unimplemented in godot shading language things.
In my opinion it should be added to GLES2 backend, but with some info added about the potential problems, with a list of known buggy devices/GPUs. Other users will have to pay quite big price for not implementing this in many cases. I've never seen any engine that would care about such problems, bannig very basic functionality.

@Megalomaniak
Copy link

@Krzycho666 in the meanwhile in shadergraph at least I've been using things like vertex colors and whatnot, any free/leftover carryovers to plug extra data from vertex program into the fragment program.

It's not a fix really but in some cases this can help.

@reduz
Copy link
Member

reduz commented Sep 15, 2016

built-in shader lang will be rewritten/improved for 3.0

On Thu, Sep 15, 2016 at 10:36 AM, quantum-entangler <
notifications@github.com> wrote:

@Krzycho666 https://github.com/Krzycho666 in the meanwhile in
shadergraph at least I've been using things like vertex colors and whatnot,
any free/leftover carryovers to plug extra data from vertex program into
the fragment program.

It's not a fix really but in some cases this can help.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#3268 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z243AgX92o_kvcx3GpK-3Nm8mjL-gks5qqUnTgaJpZM4HApCD
.

@reduz
Copy link
Member

reduz commented Aug 4, 2017

this happened and now you can use varying, closing

@reduz reduz closed this as completed Aug 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants