More tweaking + UI for the correction stuff

This commit is contained in:
Emmanuel BENOîT 2017-10-05 17:13:58 +02:00
parent 6bb35ae40e
commit 57feeca7b3
4 changed files with 9 additions and 4 deletions

View file

@ -8,6 +8,7 @@ layout( location = 4 ) uniform vec3 u_CamUp;
layout( location = 5 ) uniform float u_NearPlane;
layout( location = 6 ) uniform vec4 u_Render;
layout( location = 7 ) uniform float u_FogAttenuation;
layout( location = 8 ) uniform int u_Correction;
layout( location = 0 ) out vec3 o_Color;
layout( location = 1 ) out float o_Z;

View file

@ -58,8 +58,8 @@ vec2 RM_Map( vec3 pos )
sin( 1 ) , cos( 1 ) );
return vec2( mix( box( q , vec3( 1.5 ) ) ,
length( q ) - 1.5 ,
.5 ) ,
step( 0. , 1.9 - length( pos.xy ) ) );
.35 ) ,
step( 0. , 3 - length( pos.xy ) ) );
}
@ -105,7 +105,7 @@ void main( )
if ( r.y >= 0. ) {
const vec3 hitPos = RM_ReduceDiscontinuity(
u_CamPos , rayDir , r.x ,
tanPhi , 10 );
tanPhi , u_Correction );
const vec3 normal = RM_GetNormal( hitPos );
const int midx = int( r.y );