Skip to content
Snippets Groups Projects
Commit 64cfcea3 authored by David Parks's avatar David Parks
Browse files

SL-18190 Reduce banding - experiment with RGB16F reflection probes

parent f4d49f88
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
......@@ -122,7 +122,7 @@ void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, BOOL us
bind(0);
glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, 0, GL_RGB10_A2, resolution, resolution, count*6, 0,
glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, 0, GL_RGB16F, resolution, resolution, count*6, 0,
GL_RGB, GL_UNSIGNED_BYTE, nullptr);
mImage->setAddressMode(LLTexUnit::TAM_CLAMP);
......
......@@ -63,7 +63,7 @@ void main()
diff.rgb = linear_to_srgb(diff.rgb);
vec3 seed = diff.rgb*vec3(vary_fragcoord.xy, vary_fragcoord.x+vary_fragcoord.y)*2048;
vec3 nz = vec3(noise(seed.r), noise(seed.g), noise(seed.b));
diff.rgb += nz*0.008;
diff.rgb += nz*0.005;
frag_color = diff;
}
......@@ -80,7 +80,7 @@ void LLReflectionMapManager::update()
if (!mRenderTarget.isComplete())
{
U32 color_fmt = GL_RGB10_A2;
U32 color_fmt = GL_RGB16F;
const bool use_depth_buffer = true;
const bool use_stencil_buffer = true;
U32 targetRes = LL_REFLECTION_PROBE_RESOLUTION * 2; // super sample
......@@ -95,7 +95,7 @@ void LLReflectionMapManager::update()
mMipChain.resize(count);
for (int i = 0; i < count; ++i)
{
mMipChain[i].allocate(res, res, GL_RGB10_A2, false, false, LLTexUnit::TT_RECT_TEXTURE);
mMipChain[i].allocate(res, res, GL_RGB16F, false, false, LLTexUnit::TT_RECT_TEXTURE);
res /= 2;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment