-
-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Description
When writing this code in the Lite version i get the following output:
uniform float2 iResolution;
struct Box {
float2 location;
};
float circle(float r, float2 pixel) {
return float(length(pixel) < r);
}
float4 main(float4 pixel: SV_POSITION): SV_TARGET {
float2 uv = pixel.xy / iResolution - .5;
Box box;
box.location.y = .25; // ← LINE THAT DOES THE SHIFTING
float g = circle(.125, uv - box.location);
return float4(circle(.01, uv), g, 0, 1);
}
But when running the same code in the non web version i get this result:

When I do this:
box.location.y = .25;It is like if I was also doing this:
box.location.x = .25;If i set the x back to 0 manually, it works again.
If i write the same shader but I set the
xinstead of theyit works perfectly!
I also noticed that the pixel inspector shows two colors for the same pixel:


The fact that two colors are shown makes me think it's not a bug, am I missing something?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels