Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!


Realistic Custom Shaders With HLSL In Direct3D With Delphi 10 Berlin FireMonkey On Windows

Delphi 10 Berlin Firemonkey Windows Shaders Direct3D HLSLDeveloper Masanori Nakayama has a project over on Github which demonstrates how to use Direct3D HLSL shaders from Delphi 10 Berlin Firemonkey. You can check out the available source code for create amazing light effects for any kind of texture/material you may want to use in your own applications. Be sure to check out the included video to see it in action. The project uses Direct3D so it is for Windows only and doesn’t support Android, IOS, or OSX (where OpenGL is available). To achieve spectacular light effects, the project implemented the specular reflection/refraction effects using the Fresnel equations and the bumpy surface using the normal-mapping. For those of you who love Mathematics, Fresnel equations are used to calculate the specular reflection which is a mirror-like reflection of light from a surface, in which light from a single incoming direction is reflected into a single outgoing direction. To put it simply, when light hits a surface, there are three possible outcomes. Light may be absorbed by the material, light may be transmitted through to the other side, or light may be reflected back. In real world, there is a mixture of these outcomes. Same effects are achieved by modeling the Fresnel equations and the library can create custom shaders in HLSL on Direct3D. HLSL refers to high-level shading language, developed by Microsoft, a language used to build programmable shaders used in Direct3D (DirectX). HLSL is first introduced in Direct3D 9, and then also continued enhancements with Direct3D. HLSL shaders have high performance and are used in special effects in both 3D and 2D graphics. HLSL programs come in five forms: pixel shaders, vertex shaders, geometry shaders, compute shaders and tessellation shaders. I’m sure you are already familiar with the shader technology and the fact that these kind of shaders are used for creating gaming graphics. Using this library, you can access HLSL shader API and use it in your own applications to create amazing graphics and light effects. 

Head over to check out how you can create custom shaders in HLSL on Direct3D for Delphi Berlin and Firemonkey



Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes


Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores


DelphiCon 2020 FireMonkey Sessions Available Starting November 19


Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

Sign up for our Newsletter and
stay informed

Leave a Reply