mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:36:45 +02:00
switching to a new shader
This commit is contained in:
parent
dfc0bb8bcc
commit
76fd725610
2 changed files with 6 additions and 3 deletions
|
@ -171,7 +171,7 @@ void Antialiasing::run(const render::RenderContextPointer& renderContext, const
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fxaa_frag.h"
|
#include "taa_frag.h"
|
||||||
#include "fxaa_blend_frag.h"
|
#include "fxaa_blend_frag.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ const gpu::PipelinePointer& Antialiasing::getAntialiasingPipeline() {
|
||||||
if (!_antialiasingPipeline) {
|
if (!_antialiasingPipeline) {
|
||||||
|
|
||||||
auto vs = gpu::StandardShaderLib::getDrawUnitQuadTexcoordVS();
|
auto vs = gpu::StandardShaderLib::getDrawUnitQuadTexcoordVS();
|
||||||
auto ps = gpu::Shader::createPixel(std::string(fxaa_frag));
|
auto ps = gpu::Shader::createPixel(std::string(taa_frag));
|
||||||
gpu::ShaderPointer program = gpu::Shader::createProgram(vs, ps);
|
gpu::ShaderPointer program = gpu::Shader::createProgram(vs, ps);
|
||||||
|
|
||||||
gpu::Shader::BindingSet slotBindings;
|
gpu::Shader::BindingSet slotBindings;
|
||||||
|
|
|
@ -32,13 +32,16 @@ struct TAAParams
|
||||||
float spareB;
|
float spareB;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(std140, location=0) uniform taaParamsBuffer {
|
layout(std140) uniform taaParamsBuffer {
|
||||||
TAAParams params;
|
TAAParams params;
|
||||||
};
|
};
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
outFragColor = vec4(texture(colorTexture, varTexCoord0).xyz, params.blend);
|
outFragColor = vec4(texture(colorTexture, varTexCoord0).xyz, params.blend);
|
||||||
|
|
||||||
|
if (abs(varTexCoord0.x - params.debugX) < (1.0 / 2048.0)) {
|
||||||
|
outFragColor.rgb = vec3(1.0, 1.0, 0.0);
|
||||||
|
}
|
||||||
if (varTexCoord0.x < params.debugX) {
|
if (varTexCoord0.x < params.debugX) {
|
||||||
outFragColor.a = 1.0;
|
outFragColor.a = 1.0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue