4#include "entt/core/fwd.hpp"
13#include <entt/core/hashed_string.hpp>
28@group(0) @binding(0) var uiTexture : texture_2d<f32>;
29@group(0) @binding(1) var uiSampler : sampler;
30@group(1) @binding(0) var<uniform> screen : ScreenData;
33 @location(0) position : vec2f,
34 @location(1) color : vec4<u32>,
35 @location(2) uv : vec2f,
39 @builtin(position) Position : vec4f,
40 @location(0) color : vec4f,
41 @location(1) uv : vec2f,
45fn vs_main(input : VertexInput) -> VertexOutput {
46 var output : VertexOutput;
48 (input.position.x / screen.size.x) * 2.0 - 1.0,
49 1.0 - (input.position.y / screen.size.y) * 2.0
51 output.Position = vec4f(ndc, 0.0, 1.0);
52 output.color = vec4f(input.color) / 255.0;
58fn fs_main(input : VertexOutput) -> @location(0) vec4f {
59 let texColor = textureSample(uiTexture, uiSampler, input.uv);
60 return input.color * texColor;
72 if (renderer ==
nullptr)
76 renderer->FlushDrawCommands(renderPass);
The core is the place where all the data of the engine is stored. It contains the registry (entities)...
Definition Core.hpp:33
Definition ASingleExecutionRenderPass.hpp:9
ASingleExecutionRenderPass(std::string_view name)
Definition ASingleExecutionRenderPass.hpp:11
static RenderInterface * GetActive()
Definition RenderInterface.cpp:73
RmluiRenderPass()
Definition RmluiRenderPass.hpp:66
static Graphic::Resource::Shader CreateShader(Graphic::Resource::Context &graphicContext)
Definition RmluiRenderPass.cpp:23
virtual ~RmluiRenderPass()=default
void UniqueRenderCallback(wgpu::RenderPassEncoder &renderPass, Engine::Core &) override
Definition RmluiRenderPass.hpp:69
Definition IRenderer.hpp:6
static constexpr std::string_view RMLUI_RENDER_PASS_SHADER_NAME
Definition RmluiRenderPass.hpp:18
static constexpr std::string_view RMLUI_RENDER_PASS_SHADER_CONTENT
Definition RmluiRenderPass.hpp:22
static constexpr std::string_view RMLUI_RENDER_PASS_NAME
Definition RmluiRenderPass.hpp:17
static const entt::hashed_string RMLUI_RENDER_PASS_SHADER_ID
Definition RmluiRenderPass.hpp:19