mirror of
https://github.com/lubosz/overte.git
synced 2025-04-10 17:22:40 +02:00
Tuning the proedural shader support to work with the current default: gamma corrected emissive
This commit is contained in:
parent
492572df45
commit
ae124ebede
4 changed files with 4 additions and 4 deletions
|
@ -35,6 +35,8 @@ void main(void) {
|
|||
#ifdef PROCEDURAL
|
||||
|
||||
vec3 color = getSkyboxColor();
|
||||
// Procedural Shaders are expected to be Gamma corrected so let's bring back the RGB in linear space for the rest of the pipeline
|
||||
color = pow(color, vec3(2.2));
|
||||
_fragColor = vec4(color, 0.0);
|
||||
|
||||
#else
|
||||
|
@ -42,7 +44,6 @@ void main(void) {
|
|||
vec3 coord = normalize(_normal);
|
||||
vec3 texel = texture(cubeMap, coord).rgb;
|
||||
vec3 color = texel * _skybox._color.rgb;
|
||||
// vec3 pixel = pow(color, vec3(1.0/2.2)); // manual Gamma correction
|
||||
_fragColor = vec4(color, 0.0);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -54,7 +54,6 @@ RenderDeferredTask::RenderDeferredTask() : Task() {
|
|||
_jobs.push_back(Job(new FetchItems::JobModel("FetchOpaque",
|
||||
FetchItems([](const RenderContextPointer& context, int count) {
|
||||
context->getItemsConfig().opaque.numFeed = count;
|
||||
auto& opaque = context->getItemsConfig().opaque;
|
||||
})
|
||||
)));
|
||||
_jobs.push_back(Job(new CullItemsOpaque::JobModel("CullOpaque", _jobs.back().getOutput())));
|
||||
|
|
|
@ -141,7 +141,5 @@ void ToneMappingEffect::render(RenderArgs* args) {
|
|||
batch.setUniformBuffer(3, _parametersBuffer);
|
||||
batch.setResourceTexture(0, lightingBuffer);
|
||||
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
||||
|
||||
args->_context->render(batch);
|
||||
});
|
||||
}
|
|
@ -40,6 +40,8 @@ void main(void) {
|
|||
|
||||
#ifdef PROCEDURAL_V1
|
||||
specular = getProceduralColor().rgb;
|
||||
// Procedural Shaders are expected to be Gamma corrected so let's bring back the RGB in linear space for the rest of the pipeline
|
||||
specular = pow(specular, vec3(2.2));
|
||||
emissiveAmount = 1.0;
|
||||
#else
|
||||
emissiveAmount = getProceduralColors(diffuse, specular, shininess);
|
||||
|
|
Loading…
Reference in a new issue