Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
ShaderContainerTest.cpp File Reference
#include <gtest/gtest.h>
#include "Graphic.hpp"
#include "RenderingPipeline.hpp"
#include <glm/glm.hpp>

Functions

Graphic::Resource::Shader CreateTestShader (const std::string &name, Engine::Core &core)
auto TestShaderContainerSystem (Engine::Core &core) -> void
 TEST (ShaderContainerTest, GlobalRun)

Variables

const std::string testShaderSource

Function Documentation

◆ CreateTestShader()

Graphic::Resource::Shader CreateTestShader ( const std::string & name,
Engine::Core & core )

◆ TEST()

TEST ( ShaderContainerTest ,
GlobalRun  )

◆ TestShaderContainerSystem()

auto TestShaderContainerSystem ( Engine::Core & core) -> void

Variable Documentation

◆ testShaderSource

const std::string testShaderSource
Initial value:
= R"(
struct Uniforms {
modelViewProjectionMatrix: mat4x4f,
};
@group(0) @binding(0) var<uniform> uniforms: Uniforms;
struct VertexOutput {
@builtin(position) position: vec4f,
@location(0) uv: vec2f,
}
@vertex
fn vs_main(
@location(0) position: vec3f,
@location(1) uv: vec2f,
) -> VertexOutput {
var out: VertexOutput;
out.position = uniforms.modelViewProjectionMatrix * vec4f(position, 1.0);
out.uv = uv;
return out;
}
@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4f {
return vec4f(in.uv, 0.0, 1.0);
}
)"