Flywheel/docs/shader-api/material.glsl
PepperCode1 a4a2d6ba13 Sparse changes
- Add Model.boundingSphere()
- Fix MaterialRenderState not setting up polygon offset correctly
- Fix GlslSwitch using incorrect indentation for first and last line
- Tweak how instanced crumbling works
- Add CutoutShaders.ONE_TENTH
- Rename Contexts.WORLD to DEFAULT
- Rename Material.baseTexture() to texture
- Rename Transparency.LIGHTING to LIGHTNING
- Rename WriteMask.BOTH to COLOR_DEPTH
- Rename SimpleModel to SingleMeshModel and add new SimpleModel that
stores an arbitrary amount of meshes
- Remove flywheel:flywheel/api/* files and assume appropriate symbols
are automatically defined
- Rename many GLSL variables, functions, and constants
- Reorganize GLSL files
- Add NonExtendable annotation to some API classes
- Rename some Java classes, methods, fields, and variables
2023-12-06 22:00:31 -08:00

33 lines
1 KiB
GLSL

const uint FLW_MAT_DEPTH_TEST_OFF = 0u;
const uint FLW_MAT_DEPTH_TEST_NEVER = 1u;
const uint FLW_MAT_DEPTH_TEST_LESS = 2u;
const uint FLW_MAT_DEPTH_TEST_EQUAL = 3u;
const uint FLW_MAT_DEPTH_TEST_LEQUAL = 4u;
const uint FLW_MAT_DEPTH_TEST_GREATER = 5u;
const uint FLW_MAT_DEPTH_TEST_NOTEQUAL = 6u;
const uint FLW_MAT_DEPTH_TEST_GEQUAL = 7u;
const uint FLW_MAT_DEPTH_TEST_ALWAYS = 8u;
const uint FLW_MAT_TRANSPARENCY_OPAQUE = 0u;
const uint FLW_MAT_TRANSPARENCY_ADDITIVE = 1u;
const uint FLW_MAT_TRANSPARENCY_LIGHTNING = 2u;
const uint FLW_MAT_TRANSPARENCY_GLINT = 3u;
const uint FLW_MAT_TRANSPARENCY_CRUMBLING = 4u;
const uint FLW_MAT_TRANSPARENCY_TRANSLUCENT = 5u;
const uint FLW_MAT_WRITE_MASK_COLOR_DEPTH = 0u;
const uint FLW_MAT_WRITE_MASK_COLOR = 1u;
const uint FLW_MAT_WRITE_MASK_DEPTH = 2u;
struct FlwMaterial {
bool blur;
bool mipmap;
bool backfaceCulling;
bool polygonOffset;
uint depthTest;
uint transparency;
uint writeMask;
bool useOverlay;
bool useLight;
bool diffuse;
};