Skip to content

Commit

Permalink
Test compilation of opacity vertex shader
Browse files Browse the repository at this point in the history
  • Loading branch information
nieznanysprawiciel committed Nov 15, 2024
1 parent f35a066 commit b3c019f
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,23 @@ TEST_CASE( "GUI.Rendering.DX11.Geometry.ShaderCompilation.ForwardAttributes", "[
CHECK( renderingData.VertexShader != nullptr );
}

// ================================ //
// Test default shader for forwarding attributes.
TEST_CASE( "GUI.Rendering.DX11.Geometry.ShaderCompilation.ForwardWithOpacity", "[GUISystem][RenderingSystem][Drawing]" )
{
TestFramework* framework = GetGlobalTestFramework();

FakeDrawingPtr drawing = std::make_shared< FakeDrawing >();
FakeGeometryPtr geom = std::make_shared< FakeGeometry >( Geometry::ConstantBufferMode::Disable );
ShaderProvider* sp = framework->GetRenderingSystem()->GetShaderProvider();

geom->SetShaderFunction( "$(CoreGUI-Shader-Dir)/Geometry/ForwardWithOpacity.vsh" );

drawing->UpdateVertexShader( sp, geom.get(), sp->GetOpacityVSTemplate() );

auto& renderingData = CLASS_TESTER( Drawing )::GetGeometryRenderingData( drawing.get() );

INFO( "[Default ForwardWithOpacity.vsh] Shader compilation failed." );
CHECK( renderingData.VertexShader != nullptr );
}

0 comments on commit b3c019f

Please sign in to comment.