Timeline for Strange behaviour in vertex shader with divisions
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 28, 2017 at 16:44 | comment | added | Nathan Reed |
@4dr14n31t0rTh3G4m3r The vertex shader only runs per vertex, not for every point in the square. So the four vertices are mapped to (±2, ±2) and then the GPU draws a polygon between those vertices, which does cross the viewport. The points interior to the polygon do not go through the v.y = v.y/v.z transform, so the result is not (-inf,-2] U [2,inf) after all.
|
|
Apr 28, 2017 at 14:23 | comment | added | Adrian | But all the points inside the square results in values out of the range [ -1 ,1 ]. For example (0.1, -0.5, 0.1) -> (1, -5) | |
Apr 27, 2017 at 23:15 | comment | added | Noah Witherspoon | Okay—the result is the same, just scaled differently. | |
Apr 27, 2017 at 23:14 | history | edited | Noah Witherspoon | CC BY-SA 3.0 |
added 63 characters in body
|
Apr 27, 2017 at 22:28 | comment | added | Adrian | Sorry. I was experimenting with my code and forgot to edit the values. Then I copied and pasted and here is... I edited the question so now it has the correct values in the last set. | |
Apr 27, 2017 at 22:19 | history | answered | Noah Witherspoon | CC BY-SA 3.0 |