BruceKnowsHow / Ebin-Shaders

Other
124 stars 38 forks source link

Some improvements to Prallax #5

Closed zombye closed 8 years ago

zombye commented 8 years ago

Divide stepSize by 16 instead of multiplying my 32 and then dividing by TEXTURE_PACK_RESOLUTION. That way it should look just fine no matter what resolution your textures are.

Assuming TEXTURE_PACK_RESOLUTION == 512, this will not affect quality in any way. Assuming TEXTURE_PACK_RESOLUTION < 512, this will improve quality significantly. Assuming TEXTURE_PACK_RESOLUTION > 512, this will slightly decrease quality.

Comparison(TEXTURE_PACK_RESOLUTION == 16): Before change After change

Scale up interval at shallow angles to improve quality a LOT, by preventing parallax from effectively disappearing at those angles.