mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:21:24 +02:00
correct transparent parabola shader
This commit is contained in:
parent
ae547f8950
commit
0e079e78e6
3 changed files with 21 additions and 2 deletions
|
@ -382,9 +382,8 @@ void ParabolaPointer::RenderState::ParabolaRenderItem::updateBounds() {
|
||||||
|
|
||||||
const gpu::PipelinePointer ParabolaPointer::RenderState::ParabolaRenderItem::getParabolaPipeline() {
|
const gpu::PipelinePointer ParabolaPointer::RenderState::ParabolaRenderItem::getParabolaPipeline() {
|
||||||
if (!_parabolaPipeline || !_transparentParabolaPipeline) {
|
if (!_parabolaPipeline || !_transparentParabolaPipeline) {
|
||||||
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render_utils::program::parabola);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render_utils::program::parabola);
|
||||||
auto state = std::make_shared<gpu::State>();
|
auto state = std::make_shared<gpu::State>();
|
||||||
state->setDepthTest(true, true, gpu::LESS_EQUAL);
|
state->setDepthTest(true, true, gpu::LESS_EQUAL);
|
||||||
state->setBlendFunction(false,
|
state->setBlendFunction(false,
|
||||||
|
@ -396,6 +395,7 @@ const gpu::PipelinePointer ParabolaPointer::RenderState::ParabolaRenderItem::get
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render_utils::program::parabola_translucent);
|
||||||
auto state = std::make_shared<gpu::State>();
|
auto state = std::make_shared<gpu::State>();
|
||||||
state->setDepthTest(true, true, gpu::LESS_EQUAL);
|
state->setDepthTest(true, true, gpu::LESS_EQUAL);
|
||||||
state->setBlendFunction(true,
|
state->setBlendFunction(true,
|
||||||
|
|
18
libraries/render-utils/src/parabola_translucent.slf
Normal file
18
libraries/render-utils/src/parabola_translucent.slf
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<@include gpu/Config.slh@>
|
||||||
|
<$VERSION_HEADER$>
|
||||||
|
// Generated on <$_SCRIBE_DATE$>
|
||||||
|
//
|
||||||
|
// Created by Sam Gondelman on 9/10/2018
|
||||||
|
// Copyright 2018 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
<@include DeferredBufferWrite.slh@>
|
||||||
|
|
||||||
|
layout(location=0) in vec4 _color;
|
||||||
|
|
||||||
|
void main(void) {
|
||||||
|
packDeferredFragmentTranslucent(vec3(1.0, 0.0, 0.0), _color.a, _color.rgb, DEFAULT_FRESNEL, DEFAULT_ROUGHNESS);
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
VERTEX parabola
|
Loading…
Reference in a new issue