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

Polygon2D-based fragment shaders? #2

Open
insomniacUNDERSCORElemon opened this issue Jan 18, 2019 · 3 comments
Open

Polygon2D-based fragment shaders? #2

insomniacUNDERSCORElemon opened this issue Jan 18, 2019 · 3 comments
Assignees
Labels
Triaging To be hunted in more detail and identified properly.

Comments

@insomniacUNDERSCORElemon

Most shader info I've seen focuses on textures... from testing, that workflow doesn't work for polygons, especially ones that use UV mapping or repeating textures (and for related reasons, built-in gradients).

Does Godot's (fragment) shader system have any way to reference the polygon in some way (possibly coordinates as if it were a texture), so things like outlines and glows can be done without rendering the polygon to a texture first?

And what about the other features of polygons, like the color and vertex color? It seems like if those were supported as layers (along with the texture, and supporting order and blending) it'd allow for much greater flexibility without needing to manually stack nodes with redundant data. Although simple control (shader on top of or blended over existing colors) would be a good first step if it doesn't exist already.

@swarnimarun
Copy link
Member

Sorry for late reply. Yes it should work. I remember someone using Polygon2D to create an awesome tool for Godot that used UV Mapping and Textures.

But this deserves some looking into I will mark it for Triaging.

@swarnimarun swarnimarun added the Triaging To be hunted in more detail and identified properly. label Apr 26, 2019
@swarnimarun swarnimarun self-assigned this Apr 26, 2019
@insomniacUNDERSCORElemon
Copy link
Author

I'm not exactly sure what you mean when mentioning UV mapping and textures, but I'm not super interested in a work-around via a plugin unless maybe a powerful free plugin is created and well supported.

To be clear, my 2nd paragraph is most important here, and to add: it'd be optimal to not need textures (or screen-reading shaders) at all to have full shader support on 2D polygons. I'm aware those can be used to create shader effects-like an outline or glow-for 2D polygons, but that's likely tedious/limiting to the point where it's much less viable to use (especially for beginners or jam games going for a crisp polygonal art style).


I'm guessing Godot does not support most/all of what I've listed (especially in an easily usable form)... and if that is indeed the case, knowledgeable people should write down what should be done (be that for Godot itself or a community plugin).

@blaze-the-star
Copy link

blaze-the-star commented May 16, 2019

This would be a helpful fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaging To be hunted in more detail and identified properly.
Projects
None yet
Development

No branches or pull requests

3 participants