Zlib? This is not the same as the zlib of ZIP :)
This is the bottom layer of a game we created in 99 years,
Real-time light and shadows, to see what diablo2 thinks, for each character, add the Z axis information, so that the brightness can be calculated through the X, Y, Z coordinates, real light and shade Effects
As shown in the figure, it is the most prominent part of the skirt, Which is minimized by the light below.
The following is the description at the time:
Demonstration of light and shadow Based on Z buffer
Zip package 67 K
Direction keys and ESC keys
This is the second demonstration of the Z buffer-based light and shadow demonstration I wrote, mainly to achieve the effect of Diablo II, which is the most basic use of Z buffer.
It is not very different from the previous one.
At present, such as multi-light source, multi-color light (the color of each light source is different) can basically be achieved, but there are still some bugs, so it has not been taken out; how to do it is basically understood, although it is not the same as what I originally imagined, there should be no major problems.
I'm afraid I have no time to write it over the past few days. Let's talk about it later.
The code used to process the Z buffer is written in C, and the square sum of squares is simply calculated using the lookup table. There should be room for significant optimization.
In fact, there are still many areas that I think cannot be solved. For example, a high chair back should block part of the light, but it cannot be implemented at present. It will consume resources if it is divided into two parts, in addition, such a small place is not cost-effective. Fortunately, this kind of stuff may not be used in actual use.
I hope to discuss it with you!
We are particularly grateful for the RLA decoding Code provided by Yunfeng.