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

There is no alpha channel on the texture #7

Open
ZeruDerden opened this issue Apr 8, 2023 · 2 comments
Open

There is no alpha channel on the texture #7

ZeruDerden opened this issue Apr 8, 2023 · 2 comments

Comments

@ZeruDerden
Copy link

Hi! Thank you for sharing such a wonderful shader :) I'm still new to shader graph and I can't understand why a texture with an alpha channel superimposed on the material with your shader fills empty areas with another texture (example below):
with no shader (just unlit render pipeline):
image
with URP_PSX:
image
I understand that I can use the first example, but because of this, the wrapping effect is lost. Moreover, if you make a fence or fence with one texture (not a model), then the result is the same, the wrapping effect is lost against the background of other objects. If you have any ideas on how to solve this problem, I will be very grateful to you. Anyway, thanks for the shader!)

@GarrethD
Copy link

Hey! Was this ever resolved of has a solution been found?

@SebastianWebster
Copy link

To fix this you can just modify the main shader
In shader graph you will need to enable these
image

Use the "Enable Material Override" if you wish to be able to have some instance of the shader on a material transparent and have others opaque.

Once this is set you can just plug the alpha of the image into the alpha channel of the final Fragment stage in the shader.
It will look like this, the actual Texture 2D sample is right at the start of the graph if you want to use the alpha map that is in the albedo.

image

In engine the result will look like this
image

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

3 participants