Fix ndc vector
This commit is contained in:
parent
048bbaad6e
commit
0bed1fcda6
|
@ -53,7 +53,7 @@ float getDeltaDepth(vec3 hitCoord) {
|
|||
void rayCast(vec3 dir) {
|
||||
hitCoord = vpos;
|
||||
dir *= ssgiRayStep * 2;
|
||||
float dist = 0.1;
|
||||
float dist = 0.15;
|
||||
for (int i = 0; i < ssgiMaxSteps; i++) {
|
||||
hitCoord += dir;
|
||||
float delta = getDeltaDepth(hitCoord);
|
||||
|
|
|
@ -130,7 +130,7 @@ class Cycles {
|
|||
if (frag.bposition) {
|
||||
vert.add_out('vec3 bposition');
|
||||
if (frag.ndcpos) {
|
||||
vert.write('bposition = ndc.xyz;');
|
||||
vert.write('bposition = (ndc.xyz / ndc.w);');
|
||||
}
|
||||
else {
|
||||
vert.add_uniform('vec3 dim', '_dim');
|
||||
|
@ -155,7 +155,7 @@ class Cycles {
|
|||
if (frag.mposition) {
|
||||
vert.add_out('vec3 mposition');
|
||||
if (frag.ndcpos) {
|
||||
vert.write('mposition = ndc.xyz;');
|
||||
vert.write('mposition = (ndc.xyz / ndc.w);');
|
||||
}
|
||||
else {
|
||||
vert.write_attrib('mposition = pos.xyz;');
|
||||
|
|
Loading…
Reference in a new issue