|
OpenTTD Source 20261112-master-gbcbec5e63f
|
HLSL shader programs. More...
Go to the source code of this file.
Macros | |
| #define | _hlsl_cbuffer R"STR( cbuffer UniformConstantBuffer : register(b0) { float4 sprite; float2 screen; float zoom; bool rgb; bool crash; };)STR" |
| Defines a constant buffer for HLSL shaders that contains the sprite position, screen size, zoom level, and flags for RGB and crash mode. | |
| #define | _frag_shader_remap_func_hlsl R"STR( float max3(float3 v) { return max(max(v.x, v.y), v.z); } float3 adj_brightness(float3 colour, float3 brightness) { float3 adj = colour * (brightness > 0.0 ? brightness / 0.5 : 1.0); float3 ob_vec = clamp(adj - 1.0, 0.0, 1.0); float ob = (ob_vec.r + ob_vec.g + ob_vec.b) / 2.0; return clamp(adj + ob * (1.0 - adj), 0.0, 1.0); })STR" |
| Pixel shader function for remap brightness modulation. | |
Variables | |
| static const char | _vertex_shader_sprite_hlsl [] |
| HLSL vertex shader that positions a sprite on screen. | |
| static const char | _frag_shader_direct_hlsl [] |
| HLSL pixel shader that reads the fragment colour from a 32bpp texture. | |
| static const char | _frag_shader_palette_hlsl [] |
| HLSL pixel shader that reads the fragment colour from a 32bpp texture. | |
| static const char | _frag_shader_rgb_mask_blend_hlsl [] |
| HLSL pixel shader that performs a palette lookup to read the colour from an 8bpp texture. | |
| static const char | _frag_shader_sprite_blend_hlsl [] |
| HLSL pixel shader that performs a palette lookup to read the colour from a sprite texture. | |
HLSL shader programs.
Definition in file hlsl_shader.h.
| #define _frag_shader_remap_func_hlsl R"STR( float max3(float3 v) { return max(max(v.x, v.y), v.z); } float3 adj_brightness(float3 colour, float3 brightness) { float3 adj = colour * (brightness > 0.0 ? brightness / 0.5 : 1.0); float3 ob_vec = clamp(adj - 1.0, 0.0, 1.0); float ob = (ob_vec.r + ob_vec.g + ob_vec.b) / 2.0; return clamp(adj + ob * (1.0 - adj), 0.0, 1.0); })STR" |
Pixel shader function for remap brightness modulation.
Definition at line 95 of file hlsl_shader.h.
| #define _hlsl_cbuffer R"STR( cbuffer UniformConstantBuffer : register(b0) { float4 sprite; float2 screen; float zoom; bool rgb; bool crash; };)STR" |
Defines a constant buffer for HLSL shaders that contains the sprite position, screen size, zoom level, and flags for RGB and crash mode.
Definition at line 13 of file hlsl_shader.h.
|
static |
HLSL pixel shader that reads the fragment colour from a 32bpp texture.
Definition at line 57 of file hlsl_shader.h.
Referenced by VideoDriver_Win32D3D11::InitD3D().
|
static |
HLSL pixel shader that reads the fragment colour from a 32bpp texture.
Definition at line 75 of file hlsl_shader.h.
Referenced by VideoDriver_Win32D3D11::InitD3D().
|
static |
HLSL pixel shader that performs a palette lookup to read the colour from an 8bpp texture.
Definition at line 112 of file hlsl_shader.h.
Referenced by VideoDriver_Win32D3D11::InitD3D().
|
static |
HLSL pixel shader that performs a palette lookup to read the colour from a sprite texture.
Definition at line 142 of file hlsl_shader.h.
Referenced by VideoDriver_Win32D3D11::InitD3D().
|
static |
HLSL vertex shader that positions a sprite on screen.
Definition at line 26 of file hlsl_shader.h.
Referenced by VideoDriver_Win32D3D11::InitD3D().