Website powered by

BowlingClash - Balls Shader

The task was to make cheap and beautiful shaders for balls with maximum performance.
The basic textures of the balls (color and self-illumination) were drawn by the artist. My task was to adapt them to my shaders and finish drawing additional textures: metallic, gloss, transparency, normal maps, self-illumination.

The shaders for the ball are shown here:

1. Shader of shadow and light from the ball.
Initially, they did not plan to make light from the ball. This was my experiment, which everyone liked and decided to implement it into the game.

2. Ball shader with reflections and refractions.
Initially, we planned to make only the simplest reflections. But I decided that if you make beautiful balls, then make them VERY beautiful. First, I created a shader framework that only took into account reflections from one cubmap in the scene, taking into account normal, metallic and gloss maps. Then I implemented parallax effect support for reflections. Last of all, refractions were implemented - they spent quite a lot of time, since we had to figure out how to simulate the passage of a beam through a ball without using raytracing. As a result, I came up with and wrote a simple and fast algorithm for calculating the passage of the beam through the ball. It calculates not only the vector for sampling the cubmap, but also with its help I get information about which part of the inner walls of the ball should be visible and how the other side of the ball affects the strength of the refraction blur, which is visible in the video. In general, it turned out to be a beautiful and fast enough shader.

3. The "bloom" effect shader.
This shader, as well as various glow effects on the scene, replaces the "bloom" post-effect, which in the beginning was used to draw a halo around the glowing elements of the ball. But this effect turned out to be too heavy for the mobile format and we had to come up with both a "bloom" effect for the ball and for the environment (it can be seen on the renderings of locations).

The first test of a shader with random textures from the Internet.
Effects are shown:
1. Shadow under the ball
2. Light from sharan surface. The light falls on any surface, not just on the floor.
3. The "bloom" effect around the ball.

The refraction effect is shown here. In the shader, the refraction is analytically calculated taking into account the passage of the beam through the sphere. The inner back wall of the ball is taken into account. The refraction itself is drawn at the expe

"All Road" ball

"Angry Eagle" ball

"Archer" ball

"Bathyscaphe" ball

"Blue" ball

"Boomerang" ball

"Captains Wheel" ball

"City Lights" ball

"Compass" ball

"Electro" ball

"Pharaoh" ball

"Graffiti" ball

"Green" ball

"Ice Storm" ball

"Kaleidoscope" ball

"Knight Shield" ball

"Knockdown" ball

"Observer" ball

"Peacock Eye" ball

"Python" ball

"Samurai" ball

"Stone" ball

"Strikezilla" ball

"Sushi Roll" ball

"Toxic" ball

"Vector" ball

"Violet" ball

"Volcano" ball

"Wild Power" ball