Post

Replies

Boosts

Views

Activity

Reply to RealityKit texture sampling behaviour
Hey there, thanks for chiming in. The issue is that the texture sampler in the shader graph seems to see a (0.5,0,0) pixel in the texture image as something like (0.21,0,0) for example. The equivalent metal operation would be something like: constexpr sampler s(address::clamp_to_edge, filter::linear); float4 s = tex.sample(s, float2(0.4,0.2)); // expected float4(0.5, 0, 0), got float4(0.21, 0, 0); Does lighting affect the value of the texture sampler?
Dec ’24
Reply to RealityKit texture sampling behaviour
Here's a more direct example of the issue... in the image below, the upper gradient is a material that uses a textured image, the bottom gradient is generated from within the shader. The two gradients should be identical but the image textured material is noticably darker in the middle ranges. I imagine there's a reason for this, anybody know why the texture sampler behaves like this? gradient image texture: gradient shader graph:
Dec ’24