mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 03:59:56 +00:00
HALF_FLOAT and normals changes
This commit is contained in:
parent
061f10bef7
commit
349931b5cd
3 changed files with 16 additions and 11 deletions
|
@ -409,10 +409,14 @@ namespace MWRender
|
|||
|
||||
mViewer->stopThreading();
|
||||
|
||||
auto& shaderManager = MWBase::Environment::get().getResourceSystem()->getSceneManager()->getShaderManager();
|
||||
if (mNormalsSupported)
|
||||
{
|
||||
auto& shaderManager
|
||||
= MWBase::Environment::get().getResourceSystem()->getSceneManager()->getShaderManager();
|
||||
auto defines = shaderManager.getGlobalDefines();
|
||||
defines["disableNormals"] = mNormals ? "0" : "1";
|
||||
shaderManager.setGlobalDefines(defines);
|
||||
}
|
||||
|
||||
mRendering.getLightRoot()->setCollectPPLights(mPassLights);
|
||||
mStateUpdater->bindPointLights(mPassLights ? mRendering.getLightRoot()->getPPLightsBuffer() : nullptr);
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace fx
|
|||
{ "bgra", GL_BGRA },
|
||||
} };
|
||||
|
||||
constexpr std::array<std::pair<std::string_view, int>, 9> SourceType = { {
|
||||
constexpr std::array<std::pair<std::string_view, int>, 10> SourceType = { {
|
||||
{ "byte", GL_BYTE },
|
||||
{ "unsigned_byte", GL_UNSIGNED_BYTE },
|
||||
{ "short", GL_SHORT },
|
||||
|
@ -43,6 +43,7 @@ namespace fx
|
|||
{ "int", GL_INT },
|
||||
{ "unsigned_int", GL_UNSIGNED_INT },
|
||||
{ "unsigned_int_24_8", GL_UNSIGNED_INT_24_8 },
|
||||
{ "half_float", GL_HALF_FLOAT },
|
||||
{ "float", GL_FLOAT },
|
||||
{ "double", GL_DOUBLE },
|
||||
} };
|
||||
|
|
|
@ -80,8 +80,8 @@ shared {
|
|||
radius = max(radius, 0.1);
|
||||
// hack: make the radius wider on the screen edges
|
||||
// (makes things in the corner of the screen look less "wrong" with not-extremely-low FOVs)
|
||||
radius *= pow(texcoord.x*2.0-1.0, 2)+1.0;
|
||||
radius *= pow(texcoord.y*2.0-1.0, 2)+1.0;
|
||||
radius *= pow(texcoord.x*2.0-1.0, 2.0)+1.0;
|
||||
radius *= pow(texcoord.y*2.0-1.0, 2.0)+1.0;
|
||||
return radius;
|
||||
}
|
||||
vec3 powv(vec3 a, float x)
|
||||
|
@ -94,7 +94,7 @@ render_target RT_NoMipmap {
|
|||
width_ratio = 0.25;
|
||||
height_ratio = 0.25;
|
||||
internal_format = rgb16f;
|
||||
source_type = float;
|
||||
source_type = half_float;
|
||||
source_format = rgb;
|
||||
mipmaps = false;
|
||||
min_filter = nearest;
|
||||
|
@ -105,7 +105,7 @@ render_target RT_Horizontal {
|
|||
width_ratio = 0.25;
|
||||
height_ratio = 0.25;
|
||||
internal_format = rgb16f;
|
||||
source_type = float;
|
||||
source_type = half_float;
|
||||
source_format = rgb;
|
||||
mipmaps = false;
|
||||
min_filter = nearest;
|
||||
|
@ -116,7 +116,7 @@ render_target RT_Vertical {
|
|||
width_ratio = 0.25;
|
||||
height_ratio = 0.25;
|
||||
internal_format = rgb16f;
|
||||
source_type = float;
|
||||
source_type = half_float;
|
||||
source_format = rgb;
|
||||
mipmaps = false;
|
||||
min_filter = linear;
|
||||
|
|
Loading…
Reference in a new issue