Tags: derekmu/g3n
Tags
tweak: add VPosition variable to shaders The interpolated vertex position for a fragment should be useful. Made the Position variable in standard shaders a vec3, to match physical shaders. Removed standard vertex shader in favor of the physical vertex shader which is the same except for texture flips (not sure if that's really needed except for UI).
refactor: update colors The color.Color interface says the RGBA() method is supposed return alpha-premultiplied components. math32.Color4 wasn't doing it, so I started digging in. For text rendering, we actually want to ignore alpha-premultiplication so blending at the edges doesn't look bad. Renamed math32.Color to math32.Color3 and added math32.Color interface which declares methods for converting between Color3/4 and color.N/RGBA. This should make it easier to use other color models by implementing that interface. It's now explicit when using alpha-premultiplication (color.NGRBA does alpha-premultiplication and color.RGBA doesn't - technically RGBA documentation says it should already be premultiplied, but we can ignore it). Removed intensity from all lights. It's just a multiplier on the color. Just set brighter colors? Maybe I'm missing something, but that's never stopped me before.
PreviousNext