IrisShaders / Iris

A modern shaders mod for Minecraft compatible with existing OptiFine shader packs
https://irisshaders.dev
GNU Lesser General Public License v3.0
3.33k stars 630 forks source link

fix const float parsing #2350

Closed fayer3 closed 3 months ago

fayer3 commented 3 months ago

fixes the const float parser failing for stuff with the f suffix, or no characters after the semicolon, like

const float ambientOcclusionLevel = 1.0f;   //[0.0f 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f]

or

const float ambientOcclusionLevel = 0.5;
fayer3 commented 3 months ago

also fixes defines with float suffix like

#define AO 1.0f   // [0.0f 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f]