Damus
Rune Skovbo Johansen · 3w
In Unity (builtin pipeline), how would I call CalculateLevelOfDetail or equivalent based on a sampler2d (and uvs)? All examples seems to use a separate Texture2D and SamplerState, but then I'd have to...
Aras Pranckevičius profile picture
@nprofile1q... you can't get to SamplerState from oldskool sampler2D. So you'd need to change the related parts of the shader. "sampler2D foo" -> "Texture2D foo; SamplerState samplerfoo;", and then use foo.Sample, foo. CalculateLevelOfDetail etc. This works everywhere except on OpenGL, and it has some complexications if your shader is a surface shader. Is it?
1
Rune Skovbo Johansen · 3w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqvfhu7aelr6xh3gwqnw8zjwqv0wuzl9fejfrj9ug647ldvy3jtmkq9l5x8e Hmm, I'm a bit confused whether it's a surface shader. It doesn't seem to have #pragma surf but it does use the SurfaceOutputStandardSpecular struct. It calls LightingStandardSpecular in...