0
Solucionado

[Mobile/Android] Adreno Chipsets seem to be inverting the results of a step or if node.

cfell hace 9 años actualizado por Freya Holmér (Developer) hace 9 años 6
Hi,

Using the same shader on two different devices (e.g Note 2 and an Adreno based S5) results in two different results. (In effect where the texture becomes white on one device it is black on the other) Are you aware of any problems that shaderforge might have with this chipset? Seems to be the same whether an if or a step node is used. We are going to look at updating to the latest version of the plugin later but thought I would check with you first. Thanks for taking the time to look at this if you get the chance.

Cheers
Carl

Respuesta

Respuesta
Solucionado
That works too! Seems like one of those things that is up to them/Unity rather than SF, so, closing this
En revisión
Sounds odd - I'm not sure why that would be. It could be that in the platform in which it's black, it's simply not supported. I'd try making a lerp node, lerp between red and green, and then plug in a UV coordinate V output into the T input of the lerp node, and see how it looks on the two devices
We managed to fix the issue in the end by creating a "step" like function using simple mathematical operations (not as clean a setup but it works consistently across all platforms and devices. It seems the Adreno gpu's handle some operations slightly different to the other mobile gpu's out there. We used a clamped, ceiling'd division of two subtractions from a greyscale texture with a lower and higher float parameter.
Respuesta
Solucionado
That works too! Seems like one of those things that is up to them/Unity rather than SF, so, closing this

For me the step node gets inversed on Galaxy S5 (Adreno 330). The if node seems to be working fine though. SF 1.25, Unity 5.2.3f1.


Edit: It seems like if works fine in fragment but not for vertex offset. I have a shader in Tap to Dive that moves vertices when they are below the water surface (a float value). On the Galaxy S5 I can use the if to get the water surface rendered correctly but I also want to wobble them with vertex offset and the ones above the surface wobble instead. I will look for something that works in both fragment and vertex.

So perhabs this is a SF issue after all?

+1

Likely just a platform difference. There are lots of those