Flywheel/docs/shader-api/fragment.glsl
Jozufozu 4d216b6672 A sample of what's to come
- Clean up texture binder stuff that's no longer needed
- Move all sampler binding to program link time
- Centralize sampler bindings/names to Samplers
- Move diffuse, light, and overlay textures into the api
- Add builder for context shader
- Fix generated_indirect -> generated_instancing
2024-02-26 15:38:11 -08:00

34 lines
809 B
GLSL

#include "flywheel:api/material.glsl"
/*const*/ vec4 flw_vertexPos;
/*const*/ vec4 flw_vertexColor;
/*const*/ vec2 flw_vertexTexCoord;
/*const*/ ivec2 flw_vertexOverlay;
/*const*/ vec2 flw_vertexLight;
/*const*/ vec3 flw_vertexNormal;
/*const*/ FlwMaterial flw_material;
/*const*/ vec4 flw_sampleColor;
/*const*/ float flw_distance;
vec4 flw_fragColor;
ivec2 flw_fragOverlay;
vec2 flw_fragLight;
// To be implemented by the material fragment shader.
void flw_materialFragment();
// To be implement by fog shaders.
vec4 flw_fogFilter(vec4 color);
// To be implemented by discard shaders.
bool flw_discardPredicate(vec4 finalColor);
// To be implemented by the context shader.
void flw_beginFragment();
void flw_endFragment();
sampler2D flw_diffuseTex;
sampler2D flw_overlayTex;
sampler2D flw_lightTex;