Normal mapping of advanced lighting in opengl
normal map
opengl official documents
The core modification is the normal value in the clip shader
uniform sampler2D normalMap;
void main()
{
// Get normals from normal map range [0,1]
normal = texture(normalMap, fs_in.TexCoords).rgb;
// Convert normal vector to range [- 1,1]
normal = normalize(normal * 2.0 - 1. ...
Posted by focus310 on Sat, 06 Nov 2021 19:20:13 +0100
Implementation of Unity3D TriPlanar three plane mapping Shader
TriPlanar is a texture mapping technology without uv. There seems to be no standard translation in China. It is temporarily called TriPlanar mapping. So why doesn't the model have uv.. This is very simple. Some may be that the simple modeler forgot to do it, such as you go online and offline. However, the most important use of TriPlanar is rela ...
Posted by Paulus Magnus on Tue, 05 Oct 2021 04:58:15 +0200
Java uses the for loop: print the rules of right triangle / inverted right triangle / regular triangle / inverted regular triangle / rectangle / parallelogram / diamond
The newcomer said that after summing up the rules, it's a little fun~
Usage: nested for loop
1. The outer loop controls the number of execution rounds, and the inner loop controls the number of execution rounds
2. The outer loop controls the number of rows of the graph, and the inner loop controls the number of columns of this row
right ...
Posted by jamesm6162 on Tue, 21 Sep 2021 10:28:25 +0200
Reflection in Unity
CubeMap Sampling
Unity provides the Unity_GlossyEnvironment function to sample cubemap s. This function is implemented as follows:
half3 Unity_GlossyEnvironment (UNITY_ARGS_TEXCUBE(tex), half4 hdr, Unity_GlossyEnvironmentData glossIn)
{
half perceptualRoughness = glossIn.roughness /* perceptualRoughness */ ;
// TODO: CAUTION: remap f ...
Posted by keyont on Mon, 13 Sep 2021 00:21:25 +0200