conflict fix

This commit is contained in:
Alug committed 2024-12-08 03:24:58 +01:00
1 parent 8c295e8d5f
commit f061d66a16
2 files changed
+12 -17

No files matched your search

+7 -9
View File
@@ -21,7 +21,7 @@
#ifdef HWRENDER
#include "hw_main.h"
#include "hw_glob.h"
#include "hw_gpu.h"
#include "hw_drv.h"
#include "hw_batching.h"
#include "hw_md2.h"
#include "hw_clip.h"
@@ -683,8 +683,6 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool
if (slope)
lightlevel = HWR_CalcSlopeLight(lightlevel, slope, gl_frontsector, (FOFsector != NULL));
HWR_Lighting(&Surf, lightlevel, planecolormap);
HWR_Lighting(&Surf, lightlevel, planecolormap, P_SectorUsesDirectionalLighting(gl_frontsector));
if (PolyFlags & (PF_Translucent|PF_Fog))
@@ -5480,14 +5478,14 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
if (HWR_UseShader())
{
if (cv_ripplewater.value)
GL_SetShaderInfo(HWD_SHADERINFO_LEVELTIME, (INT32)leveltime); // The water surface shader needs the leveltime.
HWD.pfnSetShaderInfo(HWD_SHADERINFO_LEVELTIME, (INT32)leveltime); // The water surface shader needs the leveltime.
const angle_t light_angle = maplighting.angle - viewangle + ANGLE_90; // I fucking hate OGL's coordinate system
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_X, FINECOSINE(light_angle >> ANGLETOFINESHIFT));
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Y, 0);
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_Z, -FINESINE(light_angle >> ANGLETOFINESHIFT));
HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_X, FINECOSINE(light_angle >> ANGLETOFINESHIFT));
HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_Y, 0);
HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_Z, -FINESINE(light_angle >> ANGLETOFINESHIFT));
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_CONTRAST, maplighting.contrast);
GL_SetShaderInfo(HWD_SHADERINFO_LIGHT_BACKLIGHT, maplighting.backlight);
HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_CONTRAST, maplighting.contrast);
HWD.pfnSetShaderInfo(HWD_SHADERINFO_LIGHT_BACKLIGHT, maplighting.backlight);
}
if (viewnumber > 3)
+5 -8
View File
@@ -714,8 +714,8 @@ static INT32 shader_light_contrast = 0;
static INT32 shader_light_backlight = 0;
// Lactozilla: Shader functions
static boolean GL_Shader_CompileProgram(gl_shader_t *shader, GLint i);
static void GL_Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade);
static boolean Shader_CompileProgram(gl_shader_t *shader, GLint i);
static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAFloat *tint, GLRGBAFloat *fade);
static GLRGBAFloat shader_defaultcolor = {1.0f, 1.0f, 1.0f, 1.0f};
@@ -862,7 +862,7 @@ EXPORT boolean HWRAPI(CompileShader) (int slot)
// Those are given to the uniforms.
//
void GL_SetShaderInfo(hwdshaderinfo_t info, INT32 value)
EXPORT void HWRAPI(SetShaderInfo) (hwdshaderinfo_t info, INT32 value)
{
switch (info)
{
@@ -889,11 +889,11 @@ void GL_SetShaderInfo(hwdshaderinfo_t info, INT32 value)
}
}
void GL_SetShader(int slot)
EXPORT void HWRAPI(SetShader) (int slot)
{
if (slot == SHADER_NONE)
{
GL_UnSetShader();
UnSetShader();
return;
}
if (gl_allowshaders)
@@ -2035,9 +2035,6 @@ static boolean Shader_CompileProgram(gl_shader_t *shader, GLint i)
shader->uniforms[gluniform_scr_resolution] = GETUNI("scr_resolution");
// supersampling crap
shader->uniforms[gluniform_inv_supersamplefactor] = GETUNI("inv_supersamplefactor");
// misc.
shader->uniforms[gluniform_leveltime] = GETUNI("leveltime");
#undef GETUNI