mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-21 11:49:56 +02:00
Keylight working.
This commit is contained in:
parent
47a6f2d7c9
commit
8fad23aefd
2 changed files with 2 additions and 3 deletions
|
@ -158,7 +158,7 @@ void DrawHaze::run(const render::RenderContextPointer& renderContext, const Inpu
|
|||
slotBindings.insert(gpu::Shader::Binding(std::string("deferredFrameTransformBuffer"), HazeEffect_TransformBufferSlot));
|
||||
slotBindings.insert(gpu::Shader::Binding(std::string("colorMap"), HazeEffect_ColorMapSlot));
|
||||
slotBindings.insert(gpu::Shader::Binding(std::string("linearDepthMap"), HazeEffect_LinearDepthMapSlot));
|
||||
slotBindings.insert(gpu::Shader::Binding(std::string("lights"), HazeEffect_LightingMapSlot));
|
||||
slotBindings.insert(gpu::Shader::Binding(std::string("lightBuffer"), HazeEffect_LightingMapSlot));
|
||||
gpu::Shader::makeProgram(*program, slotBindings);
|
||||
|
||||
_hazePipeline = gpu::PipelinePointer(gpu::Pipeline::create(program, state));
|
||||
|
|
|
@ -58,8 +58,7 @@ void main(void) {
|
|||
vec3 eyeFragDir = normalize(worldFragPos.xyz);
|
||||
|
||||
Light light = getLight();
|
||||
//vec3 lightDirection = getLightDirection(light);
|
||||
vec3 lightDirection = normalize(vec3(-1.0, -1.0, -1.0));
|
||||
vec3 lightDirection = getLightDirection(light);
|
||||
|
||||
float directionalLightComponent = max(0.0, dot(eyeFragDir, -lightDirection));
|
||||
float power = min(1.0, pow(directionalLightComponent, hazeParams.directionalLightBlend));
|
||||
|
|
Loading…
Reference in a new issue