mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-20 08:40:48 +00:00
Only do parallax correction test for local cubemaps
This commit is contained in:
parent
69f17a61fd
commit
7d2f35ab9a
3 changed files with 5 additions and 3 deletions
|
@ -168,7 +168,8 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
// we can't start inside the box so move this outside and use the reverse path
|
||||
rayStart += reflectionVector * 10000.0;
|
||||
|
||||
if( AABBRayIntersection( bounds, rayStart, -reflectionVector, hitScale ) )
|
||||
// only do a box <-> ray intersection test if we use a local cubemap
|
||||
if( ( rpWobbleSkyX.w > 0.0 ) && AABBRayIntersection( bounds, rayStart, -reflectionVector, hitScale ) )
|
||||
{
|
||||
float3 hitPoint = rayStart - reflectionVector * hitScale;
|
||||
|
||||
|
|
|
@ -1330,7 +1330,7 @@ void idRenderBackend::DrawSingleInteraction( drawInteraction_t* din, bool useFas
|
|||
probeMins[0] = viewDef->globalProbeBounds[0][0];
|
||||
probeMins[1] = viewDef->globalProbeBounds[0][1];
|
||||
probeMins[2] = viewDef->globalProbeBounds[0][2];
|
||||
probeMins[3] = viewDef->globalProbeBounds.IsCleared() ? 1.0f : 0.0f;
|
||||
probeMins[3] = viewDef->globalProbeBounds.IsCleared() ? 0.0f : 1.0f;
|
||||
|
||||
probeMaxs[0] = viewDef->globalProbeBounds[1][0];
|
||||
probeMaxs[1] = viewDef->globalProbeBounds[1][1];
|
||||
|
|
|
@ -4656,7 +4656,8 @@ static const cgShaderDef_t cg_renderprogs[] =
|
|||
" // we can't start inside the box so move this outside and use the reverse path\n"
|
||||
" rayStart += reflectionVector * 10000.0;\n"
|
||||
"\n"
|
||||
" if( AABBRayIntersection( bounds, rayStart, -reflectionVector, hitScale ) )\n"
|
||||
" // only do a box <-> ray intersection test if we use a local cubemap\n"
|
||||
" if( ( rpWobbleSkyX.w > 0.0 ) && AABBRayIntersection( bounds, rayStart, -reflectionVector, hitScale ) )\n"
|
||||
" {\n"
|
||||
" float3 hitPoint = rayStart - reflectionVector * hitScale;\n"
|
||||
"\n"
|
||||
|
|
Loading…
Reference in a new issue