0
À l'étude

I can't see a way to access the Sampler _TexelSize properties?

Andy Buchanan il y a 7 ans mis à jour par brum il y a 6 ans 3

I'd like to get the current sampler Texel Size property, in raw shader code we just define the property and unity helpfully fills it in. I can't see how to reproduce this behavior in ShaderForge.

Sorry if it's obvious and I'm just not seeing it.


(Please note, I'm still on v1.28, we can't move to Unity 5.5 yet due to showstopper bugs in some Unity features. )

À l'étude

There's no built-in way of doing it, but you could probably add a global vector property, and call it MySampler_TexelSize, and I think you'd get the proper value.

Not possible via code node? Global seems pointless since you'd have to make a global var for each material/texture.