Open lazalong opened 1 year ago
Hi
There is a shadow contact issue in the sample shadow-sapp.c. You see it when the cube is near the floor. Compiled with gcc & VSCode
To show the issue just added a float variable cy to the state struct and the following lines at 218:
state.cy += 0.01 * t; float fff = sin(state.cy) * 2 + 0.95; const hmm_mat4 translate = HMM_Translate(HMM_Vec3(0,fff,0));
In fact it can be 'fixed' by adding 0.001 to the depth at line 154 of shadow-sapp.glsl
float depth = lightPos.z+0.001;
But that is purely by trying instead of understanding what I am doing ahaha
Hi
There is a shadow contact issue in the sample shadow-sapp.c. You see it when the cube is near the floor. Compiled with gcc & VSCode
To show the issue just added a float variable cy to the state struct and the following lines at 218: