GLSL: perform Y flip in vertex shader.
Change-Id: If7d038b4739f475bd26e0f7b3eaeec364df35ad5 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67860 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
2f17549702
commit
85a4282de6
|
@ -1914,6 +1914,9 @@ bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
|||
out << " = outputs." << name << ";" << std::endl;
|
||||
}
|
||||
}
|
||||
if (func->PipelineStage() == ast::PipelineStage::kVertex) {
|
||||
out << " gl_Position.y = -gl_Position.y;" << std::endl;
|
||||
}
|
||||
|
||||
out << "}" << std::endl << std::endl;
|
||||
|
||||
|
|
|
@ -292,6 +292,7 @@ void main() {
|
|||
col1 = outputs.col1;
|
||||
col2 = outputs.col2;
|
||||
gl_Position = outputs.pos;
|
||||
gl_Position.y = -gl_Position.y;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue