| 1 |
{ -*- buffer-read-only: t -*- } |
| 2 |
{ DON'T EDIT -- this file was automatically generated from "source/common.fs" } |
| 3 |
'/* Fragment shader utilities used by both Gouraud and Phong shading.' + LineEnding + |
| 4 |
'' + LineEnding + |
| 5 |
' Used by ../castlerendererinternalshader.pas to construct the final shader.' + LineEnding + |
| 6 |
' When you change this file, rerun `make'' and then recompile Pascal sources.' + LineEnding + |
| 7 |
'*/' + LineEnding + |
| 8 |
'' + LineEnding + |
| 9 |
'/* Wrapper for calling PLUG texture_coord_shift */' + LineEnding + |
| 10 |
'vec2 texture_coord_shifted(in vec2 tex_coord)' + LineEnding + |
| 11 |
'{' + LineEnding + |
| 12 |
' /* PLUG: texture_coord_shift (tex_coord) */' + LineEnding + |
| 13 |
' return tex_coord;' + LineEnding + |
| 14 |
'}' + LineEnding + |
| 15 |
'' + LineEnding + |
| 16 |
'// Declare functions defined in tone_mapping.fs' + LineEnding + |
| 17 |
'' + LineEnding + |
| 18 |
'/* sRGB to linear conversion.' + LineEnding + |
| 19 |
' Leaves alpha unmodified.' + LineEnding + |
| 20 |
'' + LineEnding + |
| 21 |
' Input is returned unchanged if CASTLE_GAMMA_CORRECTION not defined.' + LineEnding + |
| 22 |
'*/' + LineEnding + |
| 23 |
'vec4 castle_texture_color_to_linear(const in vec4 srgbIn);' + LineEnding + |
| 24 |
'' + LineEnding + |
| 25 |
'/* sRGB to linear conversion.' + LineEnding + |
| 26 |
' Input is returned unchanged if CASTLE_GAMMA_CORRECTION not defined.' + LineEnding + |
| 27 |
'*/' + LineEnding + |
| 28 |
'vec3 castle_texture_color_to_linear(const in vec3 srgbIn);' + LineEnding + |
| 29 |
'' + LineEnding + |
| 30 |
'/* Linear to sRGB conversion and applying tone mapping.' + LineEnding + |
| 31 |
' Input is returned unchanged if' + LineEnding + |
| 32 |
' neither CASTLE_GAMMA_CORRECTION nor CASTLE_TONE_MAPPING are defined.' + LineEnding + |
| 33 |
'*/' + LineEnding + |
| 34 |
'vec3 castle_linear_to_screen(const in vec3 color);' + LineEnding + |
| 35 |
'' |