Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed pkg/daemon_src.dpkdir/lights/mkintsquarelight1a.png
Binary file not shown.
Binary file removed pkg/daemon_src.dpkdir/lights/mkintsquarelight1b.png
Binary file not shown.
Binary file removed pkg/daemon_src.dpkdir/lights/round.png
Binary file not shown.
Binary file removed pkg/daemon_src.dpkdir/lights/squarelight1.png
Binary file not shown.
43 changes: 0 additions & 43 deletions pkg/daemon_src.dpkdir/scripts/engine.shader
Original file line number Diff line number Diff line change
Expand Up @@ -28,46 +28,3 @@ gfx/2d/bigchars
rgbgen vertex
}
}

lights/defaultDynamicLight
{
{
stage attenuationMapZ
map lights/mkintsquarelight1a
edgeClamp
}
{
stage attenuationMapXY
forceHighQuality
map lights/round
colored
zeroClamp
}
}

lights/defaultPointLight
{
// this will also be the falloff for any
// point light shaders that don't specify one
lightFalloffImage lights/mkintsquarelight1a
{
stage attenuationMapXY
forceHighQuality
map lights/squarelight1
colored
zeroClamp
}
}

lights/defaultProjectedLight
{
// by default, stay bright almost all the way to the end
lightFalloffImage lights/mkintsquarelight1b
{
stage attenuationMapXY
forceHighQuality
map lights/squarelight1
colored
zeroClamp
}
}
6 changes: 0 additions & 6 deletions src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,8 @@ set(GLSLSOURCELIST
${ENGINE_DIR}/renderer/glsl_source/vertexSkinning_vp.glsl

# Regular shaders
${ENGINE_DIR}/renderer/glsl_source/debugShadowMap_vp.glsl
${ENGINE_DIR}/renderer/glsl_source/debugShadowMap_fp.glsl
${ENGINE_DIR}/renderer/glsl_source/fogQuake3_vp.glsl
${ENGINE_DIR}/renderer/glsl_source/fogQuake3_fp.glsl
${ENGINE_DIR}/renderer/glsl_source/forwardLighting_vp.glsl
${ENGINE_DIR}/renderer/glsl_source/forwardLighting_fp.glsl
${ENGINE_DIR}/renderer/glsl_source/generic_vp.glsl
${ENGINE_DIR}/renderer/glsl_source/generic_fp.glsl
${ENGINE_DIR}/renderer/glsl_source/heatHaze_vp.glsl
Expand All @@ -203,8 +199,6 @@ set(GLSLSOURCELIST
${ENGINE_DIR}/renderer/glsl_source/reflection_CB_fp.glsl
${ENGINE_DIR}/renderer/glsl_source/screen_vp.glsl
${ENGINE_DIR}/renderer/glsl_source/screen_fp.glsl
${ENGINE_DIR}/renderer/glsl_source/shadowFill_vp.glsl
${ENGINE_DIR}/renderer/glsl_source/shadowFill_fp.glsl
${ENGINE_DIR}/renderer/glsl_source/skybox_vp.glsl
${ENGINE_DIR}/renderer/glsl_source/skybox_fp.glsl
)
Expand Down
1 change: 1 addition & 0 deletions src/engine/qcommon/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,7 @@ inline vec_t VectorNormalize2( const vec3_t v, vec3_t out )

using GameStateCSs = std::array<std::string, MAX_CONFIGSTRINGS>;

// TODO(0.56): NUKE all
#define REF_FORCE_DLIGHT ( 1 << 31 ) // RF, passed in through overdraw parameter, force this dlight under all conditions
#define REF_JUNIOR_DLIGHT ( 1 << 30 ) // (SA) this dlight does not light surfaces. it only affects dynamic light grid
#define REF_DIRECTED_DLIGHT ( 1 << 29 ) // ydnar: global directional light, origin should be interpreted as a normal vector
Expand Down
22 changes: 11 additions & 11 deletions src/engine/renderer/GeometryOptimiser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ static int LeafSurfaceCompare( const void* a, const void* b ) {
}

// sort by leaf
if ( aa->interactionBits < bb->interactionBits ) {
if ( aa->scratch2 < bb->scratch2 ) {
Comment thread
VReaperV marked this conversation as resolved.
return -1;
} else if ( aa->interactionBits > bb->interactionBits ) {
} else if ( aa->scratch2 > bb->scratch2 ) {
return 1;
}

// sort by leaf marksurfaces index to increase the likelihood of multidraw merging in the backend
if ( aa->lightCount < bb->lightCount ) {
if ( aa->scratch1 < bb->scratch1 ) {
return -1;
} else if ( aa->lightCount > bb->lightCount ) {
} else if ( aa->scratch1 > bb->scratch1 ) {
return 1;
}
return 0;
Expand Down Expand Up @@ -147,8 +147,8 @@ static void CoreResetSurfaceViewCounts( bspSurface_t** rendererSurfaces, int num
bspSurface_t* surface = rendererSurfaces[i];

surface->viewCount = -1;
surface->lightCount = -1;
surface->interactionBits = 0;
surface->scratch1 = -1;
surface->scratch2 = 0;
}
}

Expand All @@ -175,8 +175,8 @@ void OptimiseMapGeometryCore( world_t* world, bspSurface_t** rendererSurfaces, i
int fogIndex1 = surf1->fogIndex;
int lightMapNum1 = surf1->lightmapNum;
surf1->viewCount = surf1 - world->surfaces;
surf1->lightCount = j;
surf1->interactionBits = i;
surf1->scratch1 = j;
surf1->scratch2 = i;

bool merged = false;
for ( int k = j + 1; k < leaf->numMarkSurfaces; k++ ) {
Expand All @@ -198,14 +198,14 @@ void OptimiseMapGeometryCore( world_t* world, bspSurface_t** rendererSurfaces, i
}

surf2->viewCount = surf1->viewCount;
surf2->lightCount = k;
surf2->interactionBits = i;
surf2->scratch1 = k;
surf2->scratch2 = i;
merged = true;
}

if ( !merged ) {
surf1->viewCount = -1;
surf1->lightCount = -1;
surf1->scratch1 = -1;
// don't clear the leaf number so
// surfaces that arn't merged are placed
// closer to other leafs in the vbo
Expand Down
13 changes: 4 additions & 9 deletions src/engine/renderer/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,6 @@ void BindShaderGeneric3D( Material* material ) {
// Set shader uniforms.
if ( material->tcGenEnvironment ) {
gl_genericShaderMaterial->SetUniform_ViewOrigin( backEnd.orientation.viewOrigin );
gl_genericShaderMaterial->SetUniform_ViewUp( backEnd.orientation.axis[2] );
}

gl_genericShaderMaterial->SetUniform_ModelMatrix( backEnd.orientation.transformMatrix );
Expand Down Expand Up @@ -794,11 +793,9 @@ void BindShaderLightMapping( Material* material ) {
gl_lightMappingShaderMaterial->SetUniformBlock_Lights( tr.dlightUBO );

// bind u_LightTiles
if ( r_realtimeLightingRenderer.Get() == Util::ordinal( realtimeLightingRenderer_t::TILED ) ) {
gl_lightMappingShaderMaterial->SetUniform_LightTilesBindless(
GL_BindToTMU( BIND_LIGHTTILES, tr.lighttileRenderImage )
);
}
gl_lightMappingShaderMaterial->SetUniform_LightTilesBindless(
GL_BindToTMU( BIND_LIGHTTILES, tr.lighttileRenderImage )
);
}

gl_lightMappingShaderMaterial->SetUniform_ViewOrigin( backEnd.orientation.viewOrigin );
Expand Down Expand Up @@ -1429,9 +1426,7 @@ void MaterialSystem::AddStageTextures( MaterialSurface* surface, shader_t* shade
surface->texDataDynamic[stage] = dynamic;

if ( glConfig2.realtimeLighting ) {
if ( r_realtimeLightingRenderer.Get() == Util::ordinal( realtimeLightingRenderer_t::TILED ) ) {
material->AddTexture( tr.lighttileRenderImage->texture );
}
material->AddTexture( tr.lighttileRenderImage->texture );
}
}

Expand Down
Loading