Blender 2.80 (sub 57) Build: 17/04/2019 17:26 Windows Release argv[0] = blender argv[1] = --debug argv[2] = --debug-gpu argv[3] = --python-expr argv[4] = import bpy; bpy.ops.wm.sysinfo(filepath=r'C:\Users\HP\AppData\Local\Temp\blender\debug_logs\blender_system_info.txt') read file C:\Users\HP\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend Version 280 sub 53 date 2019-03-31 21:52 hash b936d7b16c62 Read prefs: C:\Users\HP\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend read file Version 280 sub 39 date unknown hash unknown GPUTexture: create : TEXTURE_CUBE_MAP, RGBA16F, w : 2, h : 2, d : 0, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_1D, RGBA8, w : 1, h : 0, d : 0, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 1, h : 1, d : 0, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_3D, RGBA8, w : 1, h : 1, d : 1, comp : 4, size : 0.00 MiB Using OpenGL 4.3 debug facilities GL application marker: Successfully hooked OpenGL debug callback. found bundled python: E:\Blender\Blender Program\blender-2.80.0-git.b46245470f79-windows64 20.4.19\2.80\python GPUTexture: create : TEXTURE_2D, RGBA8, w : 899, h : 26, d : 0, comp : 4, size : 0.09 MiB GPUTexture: create : TEXTURE_2D, R8, w : 16384, h : 128, d : 0, comp : 1, size : 2.00 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 3 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 3 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 405, h : 26, d : 0, comp : 4, size : 0.04 MiB GL API other: Buffer detailed info: Buffer object 4 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 4 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 16, h : 32, d : 0, comp : 4, size : 0.00 MiB GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1288, h : 32, d : 0, comp : 4, size : 0.16 MiB GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1304, h : 20, d : 0, comp : 4, size : 0.10 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 226, h : 26, d : 0, comp : 4, size : 0.02 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 29, h : 425, d : 0, comp : 4, size : 0.05 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API performance: Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches. GPUTexture: create : TEXTURE_2D, RGBA8, w : 197, h : 425, d : 0, comp : 4, size : 0.32 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, R8, w : 16384, h : 128, d : 0, comp : 1, size : 2.00 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 226, h : 26, d : 0, comp : 4, size : 0.02 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 226, h : 188, d : 0, comp : 4, size : 0.16 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 5 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 5 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 26, d : 0, comp : 4, size : 0.11 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 24, d : 0, comp : 4, size : 0.10 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API performance: Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 6 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 6 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 7 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 7 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 26, d : 0, comp : 4, size : 0.11 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 56, h : 589, d : 0, comp : 4, size : 0.13 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 8 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 8 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 615, d : 0, comp : 4, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, DEPTH24_STENCIL8, w : 1077, h : 615, d : 0, comp : 1, size : 2.53 MiB GPUTexture: create : TEXTURE_1D, RGBA8, w : 257, h : 0, d : 0, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_1D, RGBA8, w : 256, h : 0, d : 0, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_3D, RGBA8, w : 1, h : 1, d : 1, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_1D, RGBA8, w : 1, h : 0, d : 0, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_2D, R11F_G11F_B10F, w : 1077, h : 615, d : 0, comp : 3, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 615, d : 0, comp : 4, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, R32UI, w : 1077, h : 615, d : 0, comp : 1, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, RG16, w : 1077, h : 615, d : 0, comp : 2, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, RGBA16F, w : 64, h : 64, d : 0, comp : 4, size : 0.06 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 615, d : 0, comp : 4, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, DEPTH24_STENCIL8, w : 1077, h : 615, d : 0, comp : 1, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 16, h : 16, d : 0, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_2D, DEPTH_COMPONENT24, w : 1077, h : 615, d : 0, comp : 1, size : 1.90 MiB GPUTexture: create : TEXTURE_2D, R16UI, w : 1077, h : 615, d : 0, comp : 1, size : 1.26 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 615, d : 0, comp : 4, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, R8, w : 16384, h : 64, d : 0, comp : 1, size : 1.00 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 527, h : 491, d : 0, comp : 4, size : 0.99 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API performance: Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API performance: Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches. GL API other: Buffer detailed info: Buffer object 161 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 161 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API performance: Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 623, h : 91, d : 0, comp : 4, size : 0.22 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 623, h : 91, d : 0, comp : 4, size : 0.22 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. read file Version 280 sub 39 date unknown hash unknown GPUTexture: create : TEXTURE_2D, RGBA8, w : 899, h : 26, d : 0, comp : 4, size : 0.09 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GPUTexture: create : TEXTURE_2D, R8, w : 16384, h : 128, d : 0, comp : 1, size : 2.00 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 405, h : 26, d : 0, comp : 4, size : 0.04 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 16, h : 32, d : 0, comp : 4, size : 0.00 MiB GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1288, h : 32, d : 0, comp : 4, size : 0.16 MiB GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1304, h : 20, d : 0, comp : 4, size : 0.10 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 226, h : 26, d : 0, comp : 4, size : 0.02 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 29, h : 425, d : 0, comp : 4, size : 0.05 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GPUTexture: create : TEXTURE_2D, RGBA8, w : 197, h : 425, d : 0, comp : 4, size : 0.32 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, R8, w : 16384, h : 128, d : 0, comp : 1, size : 2.00 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 226, h : 26, d : 0, comp : 4, size : 0.02 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 226, h : 188, d : 0, comp : 4, size : 0.16 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 26, d : 0, comp : 4, size : 0.11 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 24, d : 0, comp : 4, size : 0.10 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 26, d : 0, comp : 4, size : 0.11 MiB GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 56, h : 589, d : 0, comp : 4, size : 0.13 MiB GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 615, d : 0, comp : 4, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, DEPTH24_STENCIL8, w : 1077, h : 615, d : 0, comp : 1, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, R11F_G11F_B10F, w : 1077, h : 615, d : 0, comp : 3, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 615, d : 0, comp : 4, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, R32UI, w : 1077, h : 615, d : 0, comp : 1, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, RG16, w : 1077, h : 615, d : 0, comp : 2, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 615, d : 0, comp : 4, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, DEPTH24_STENCIL8, w : 1077, h : 615, d : 0, comp : 1, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, DEPTH_COMPONENT24, w : 1077, h : 615, d : 0, comp : 1, size : 1.90 MiB GPUTexture: create : TEXTURE_2D, R16UI, w : 1077, h : 615, d : 0, comp : 1, size : 1.26 MiB GPUTexture: create : TEXTURE_2D, RGBA8, w : 1077, h : 615, d : 0, comp : 4, size : 2.53 MiB GPUTexture: create : TEXTURE_2D, R8, w : 16384, h : 64, d : 0, comp : 1, size : 1.00 MiB GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 366, h : 125, d : 0, comp : 4, size : 0.17 MiB GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 162 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 162 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GPUTexture: create : TEXTURE_2D, RGBA8, w : 223, h : 196, d : 0, comp : 4, size : 0.17 MiB GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. Evaluate all animation - 1.000000 No Actions, so no animation needs to be evaluated... GL API other: Texture state usage warning: Texture 0 is base level inconsistent. Check texture size. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), and GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast). GL API other: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations. GL API other: Texture state usage warning: Waste of memory: Texture 0 has mipmaps, while it's min filter is inconsistent with mipmaps. GPUTexture: create : TEXTURE_2D, RGBA8, w : 1288, h : 26, d : 0, comp : 4, size : 0.13 MiB GPUTexture: create : TEXTURE_2D, DEPTH24_STENCIL8, w : 1920, h : 1080, d : 0, comp : 1, size : 7.91 MiB GPUTexture: create : TEXTURE_2D, RGBA32F, w : 1920, h : 1080, d : 0, comp : 4, size : 63.28 MiB GPUTexture: create : TEXTURE_2D, RGBA32F, w : 1920, h : 1080, d : 0, comp : 4, size : 63.28 MiB GPUTexture: create : TEXTURE_2D, DEPTH_COMPONENT24, w : 960, h : 540, d : 0, comp : 1, size : 1.48 MiB GPUTexture: create : TEXTURE_2D, DEPTH24_STENCIL8, w : 1920, h : 1080, d : 0, comp : 1, size : 7.91 MiB GPUTexture: create : TEXTURE_2D, RGBA32F, w : 1920, h : 1080, d : 0, comp : 4, size : 63.28 MiB GPUTexture: create : TEXTURE_2D, RGBA32F, w : 1920, h : 1080, d : 0, comp : 4, size : 63.28 MiB GPUTexture: create : TEXTURE_2D_ARRAY, RGBA16F, w : 64, h : 64, d : 20, comp : 4, size : 1.25 MiB GPUTexture: create : TEXTURE_2D, RGBA16F, w : 64, h : 64, d : 0, comp : 4, size : 0.06 MiB GPUShader: compile error: ===== shader string 1 ==== 1 #version 330 ===== shader string 2 ==== 2 #define GPU_FRAGMENT_SHADER ===== shader string 3 ==== 3 #extension GL_ARB_texture_gather: enable 4 #define GPU_ARB_texture_gather 5 #extension GL_ARB_texture_query_lod: enable ===== shader string 4 ==== 6 #define GPU_NVIDIA 7 #define OS_WIN ===== shader string 5 ==== 8 #define HAMMERSLEY_SIZE 1024 9 #define IRRADIANCE_HL2 10 #define NOISE_SIZE 64 ===== shader string 6 ==== 11 /* keep in sync with DRWManager.view_data */ 12 layout(std140) uniform viewBlock 13 { 14 /* Same order as DRWViewportMatrixType */ 15 mat4 ViewProjectionMatrix; 16 mat4 ViewProjectionMatrixInverse; 17 mat4 ViewMatrix; 18 mat4 ViewMatrixInverse; 19 mat4 ProjectionMatrix; 20 mat4 ProjectionMatrixInverse; 21 22 vec4 CameraTexCoFactors; 23 24 vec4 clipPlanes[2]; 25 }; 26 27 layout(std140) uniform common_block 28 { 29 mat4 pastViewProjectionMatrix; 30 vec4 viewVecs[2]; 31 vec2 mipRatio[10]; /* To correct mip level texel mis-alignement */ 32 /* Ambient Occlusion */ 33 vec4 aoParameters[2]; 34 /* Volumetric */ 35 ivec4 volTexSize; 36 vec4 volDepthParameters; /* Parameters to the volume Z equation */ 37 vec4 volInvTexSize; 38 vec4 volJitter; 39 vec4 volCoordScale; /* To convert volume uvs to screen uvs */ 40 float volHistoryAlpha; 41 float volLightClamp; 42 float volShadowSteps; 43 bool volUseLights; 44 /* Screen Space Reflections */ 45 vec4 ssrParameters; 46 float ssrBorderFac; 47 float ssrMaxRoughness; 48 float ssrFireflyFac; 49 float ssrBrdfBias; 50 bool ssrToggle; 51 /* SubSurface Scattering */ 52 float sssJitterThreshold; 53 bool sssToggle; 54 /* Specular */ 55 bool specToggle; 56 /* Lights */ 57 int laNumLight; 58 /* Probes */ 59 int prbNumPlanar; 60 int prbNumRenderCube; 61 int prbNumRenderGrid; 62 int prbIrradianceVisSize; 63 float prbIrradianceSmooth; 64 float prbLodCubeMax; 65 float prbLodPlanarMax; 66 /* Misc*/ 67 int hizMipOffset; 68 int rayType; 69 float rayDepth; 70 }; 71 72 /* rayType (keep in sync with ray_type) */ 73 #define EEVEE_RAY_CAMERA 0 74 #define EEVEE_RAY_SHADOW 1 75 #define EEVEE_RAY_DIFFUSE 2 76 #define EEVEE_RAY_GLOSSY 3 77 78 /* aoParameters */ 79 #define aoDistance aoParameters[0].x 80 #define aoSamples aoParameters[0].y /* UNUSED */ 81 #define aoFactor aoParameters[0].z 82 #define aoInvSamples aoParameters[0].w /* UNUSED */ 83 84 #define aoOffset aoParameters[1].x /* UNUSED */ 85 #define aoBounceFac aoParameters[1].y 86 #define aoQuality aoParameters[1].z 87 #define aoSettings aoParameters[1].w 88 89 /* ssrParameters */ 90 #define ssrQuality ssrParameters.x 91 #define ssrThickness ssrParameters.y 92 #define ssrPixelSize ssrParameters.zw 93 94 #define M_PI 3.14159265358979323846 /* pi */ 95 #define M_2PI 6.28318530717958647692 /* 2*pi */ 96 #define M_PI_2 1.57079632679489661923 /* pi/2 */ 97 #define M_1_PI 0.318309886183790671538 /* 1/pi */ 98 #define M_1_2PI 0.159154943091895335768 /* 1/(2*pi) */ 99 #define M_1_PI2 0.101321183642337771443 /* 1/(pi^2) */ 100 101 #define LUT_SIZE 64 102 103 /* Buffers */ 104 uniform sampler2D colorBuffer; 105 uniform sampler2D depthBuffer; 106 uniform sampler2D maxzBuffer; 107 uniform sampler2D minzBuffer; 108 uniform sampler2DArray planarDepth; 109 110 #define cameraForward normalize(ViewMatrixInverse[2].xyz) 111 #define cameraPos ViewMatrixInverse[3].xyz 112 #define cameraVec \ 113 ((ProjectionMatrix[3][3] == 0.0) ? normalize(cameraPos - worldPosition) : cameraForward) 114 #define viewCameraVec \ 115 ((ProjectionMatrix[3][3] == 0.0) ? normalize(-viewPosition) : vec3(0.0, 0.0, 1.0)) 116 117 /* ------- Structures -------- */ 118 119 /* ------ Lights ----- */ 120 struct LightData { 121 vec4 position_influence; /* w : InfluenceRadius (inversed and squared) */ 122 vec4 color_spec; /* w : Spec Intensity */ 123 vec4 spotdata_radius_shadow; /* x : spot size, y : spot blend, z : radius, w: shadow id */ 124 vec4 rightvec_sizex; /* xyz: Normalized up vector, w: area size X or spot scale X */ 125 vec4 upvec_sizey; /* xyz: Normalized right vector, w: area size Y or spot scale Y */ 126 vec4 forwardvec_type; /* xyz: Normalized forward vector, w: Light Type */ 127 }; 128 129 /* convenience aliases */ 130 #define l_color color_spec.rgb 131 #define l_spec color_spec.a 132 #define l_position position_influence.xyz 133 #define l_influence position_influence.w 134 #define l_sizex rightvec_sizex.w 135 #define l_sizey upvec_sizey.w 136 #define l_right rightvec_sizex.xyz 137 #define l_up upvec_sizey.xyz 138 #define l_forward forwardvec_type.xyz 139 #define l_type forwardvec_type.w 140 #define l_spot_size spotdata_radius_shadow.x 141 #define l_spot_blend spotdata_radius_shadow.y 142 #define l_radius spotdata_radius_shadow.z 143 #define l_shadowid spotdata_radius_shadow.w 144 145 /* ------ Shadows ----- */ 146 #ifndef MAX_CASCADE_NUM 147 # define MAX_CASCADE_NUM 4 148 #endif 149 150 struct ShadowData { 151 vec4 near_far_bias_exp; 152 vec4 shadow_data_start_end; 153 vec4 contact_shadow_data; 154 }; 155 156 struct ShadowCubeData { 157 vec4 position; 158 }; 159 160 struct ShadowCascadeData { 161 mat4 shadowmat[MAX_CASCADE_NUM]; 162 vec4 split_start_distances; 163 vec4 split_end_distances; 164 }; 165 166 /* convenience aliases */ 167 #define sh_near near_far_bias_exp.x 168 #define sh_far near_far_bias_exp.y 169 #define sh_bias near_far_bias_exp.z 170 #define sh_exp near_far_bias_exp.w 171 #define sh_bleed near_far_bias_exp.w 172 #define sh_tex_start shadow_data_start_end.x 173 #define sh_data_start shadow_data_start_end.y 174 #define sh_multi_nbr shadow_data_start_end.z 175 #define sh_blur shadow_data_start_end.w 176 #define sh_contact_dist contact_shadow_data.x 177 #define sh_contact_offset contact_shadow_data.y 178 #define sh_contact_spread contact_shadow_data.z 179 #define sh_contact_thickness contact_shadow_data.w 180 181 /* ------- Convenience functions --------- */ 182 183 vec3 mul(mat3 m, vec3 v) 184 { 185 return m * v; 186 } 187 mat3 mul(mat3 m1, mat3 m2) 188 { 189 return m1 * m2; 190 } 191 vec3 transform_direction(mat4 m, vec3 v) 192 { 193 return mat3(m) * v; 194 } 195 vec3 transform_point(mat4 m, vec3 v) 196 { 197 return (m * vec4(v, 1.0)).xyz; 198 } 199 vec3 project_point(mat4 m, vec3 v) 200 { 201 vec4 tmp = m * vec4(v, 1.0); 202 return tmp.xyz / tmp.w; 203 } 204 205 #define min3(a, b, c) min(a, min(b, c)) 206 #define min4(a, b, c, d) min(a, min3(b, c, d)) 207 #define min5(a, b, c, d, e) min(a, min4(b, c, d, e)) 208 #define min6(a, b, c, d, e, f) min(a, min5(b, c, d, e, f)) 209 #define min7(a, b, c, d, e, f, g) min(a, min6(b, c, d, e, f, g)) 210 #define min8(a, b, c, d, e, f, g, h) min(a, min7(b, c, d, e, f, g, h)) 211 #define min9(a, b, c, d, e, f, g, h, i) min(a, min8(b, c, d, e, f, g, h, i)) 212 213 #define max3(a, b, c) max(a, max(b, c)) 214 #define max4(a, b, c, d) max(a, max3(b, c, d)) 215 #define max5(a, b, c, d, e) max(a, max4(b, c, d, e)) 216 #define max6(a, b, c, d, e, f) max(a, max5(b, c, d, e, f)) 217 #define max7(a, b, c, d, e, f, g) max(a, max6(b, c, d, e, f, g)) 218 #define max8(a, b, c, d, e, f, g, h) max(a, max7(b, c, d, e, f, g, h)) 219 #define max9(a, b, c, d, e, f, g, h, i) max(a, max8(b, c, d, e, f, g, h, i)) 220 221 #define avg3(a, b, c) (a + b + c) * (1.0 / 3.0) 222 #define avg4(a, b, c, d) (a + b + c + d) * (1.0 / 4.0) 223 #define avg5(a, b, c, d, e) (a + b + c + d + e) * (1.0 / 5.0) 224 #define avg6(a, b, c, d, e, f) (a + b + c + d + e + f) * (1.0 / 6.0) 225 #define avg7(a, b, c, d, e, f, g) (a + b + c + d + e + f + g) * (1.0 / 7.0) 226 #define avg8(a, b, c, d, e, f, g, h) (a + b + c + d + e + f + g + h) * (1.0 / 8.0) 227 #define avg9(a, b, c, d, e, f, g, h, i) (a + b + c + d + e + f + g + h + i) * (1.0 / 9.0) 228 229 float min_v2(vec2 v) 230 { 231 return min(v.x, v.y); 232 } 233 float min_v3(vec3 v) 234 { 235 return min(v.x, min(v.y, v.z)); 236 } 237 float max_v2(vec2 v) 238 { 239 return max(v.x, v.y); 240 } 241 float max_v3(vec3 v) 242 { 243 return max(v.x, max(v.y, v.z)); 244 } 245 246 float sum(vec2 v) 247 { 248 return dot(vec2(1.0), v); 249 } 250 float sum(vec3 v) 251 { 252 return dot(vec3(1.0), v); 253 } 254 float sum(vec4 v) 255 { 256 return dot(vec4(1.0), v); 257 } 258 259 float saturate(float a) 260 { 261 return clamp(a, 0.0, 1.0); 262 } 263 vec2 saturate(vec2 a) 264 { 265 return clamp(a, 0.0, 1.0); 266 } 267 vec3 saturate(vec3 a) 268 { 269 return clamp(a, 0.0, 1.0); 270 } 271 vec4 saturate(vec4 a) 272 { 273 return clamp(a, 0.0, 1.0); 274 } 275 276 float distance_squared(vec2 a, vec2 b) 277 { 278 a -= b; 279 return dot(a, a); 280 } 281 float distance_squared(vec3 a, vec3 b) 282 { 283 a -= b; 284 return dot(a, a); 285 } 286 float len_squared(vec3 a) 287 { 288 return dot(a, a); 289 } 290 291 float inverse_distance(vec3 V) 292 { 293 return max(1 / length(V), 1e-8); 294 } 295 296 vec2 mip_ratio_interp(float mip) 297 { 298 float low_mip = floor(mip); 299 return mix(mipRatio[int(low_mip)], mipRatio[int(low_mip + 1.0)], mip - low_mip); 300 } 301 302 /* ------- RNG ------- */ 303 304 float wang_hash_noise(uint s) 305 { 306 s = (s ^ 61u) ^ (s >> 16u); 307 s *= 9u; 308 s = s ^ (s >> 4u); 309 s *= 0x27d4eb2du; 310 s = s ^ (s >> 15u); 311 312 return fract(float(s) / 4294967296.0); 313 } 314 315 /* ------- Fast Math ------- */ 316 317 /* [Drobot2014a] Low Level Optimizations for GCN */ 318 float fast_sqrt(float v) 319 { 320 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 321 } 322 323 vec2 fast_sqrt(vec2 v) 324 { 325 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 326 } 327 328 /* [Eberly2014] GPGPU Programming for Games and Science */ 329 float fast_acos(float v) 330 { 331 float res = -0.156583 * abs(v) + M_PI_2; 332 res *= fast_sqrt(1.0 - abs(v)); 333 return (v >= 0) ? res : M_PI - res; 334 } 335 336 vec2 fast_acos(vec2 v) 337 { 338 vec2 res = -0.156583 * abs(v) + M_PI_2; 339 res *= fast_sqrt(1.0 - abs(v)); 340 v.x = (v.x >= 0) ? res.x : M_PI - res.x; 341 v.y = (v.y >= 0) ? res.y : M_PI - res.y; 342 return v; 343 } 344 345 float point_plane_projection_dist(vec3 lineorigin, vec3 planeorigin, vec3 planenormal) 346 { 347 return dot(planenormal, planeorigin - lineorigin); 348 } 349 350 float line_plane_intersect_dist(vec3 lineorigin, 351 vec3 linedirection, 352 vec3 planeorigin, 353 vec3 planenormal) 354 { 355 return dot(planenormal, planeorigin - lineorigin) / dot(planenormal, linedirection); 356 } 357 358 float line_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec4 plane) 359 { 360 vec3 plane_co = plane.xyz * (-plane.w / len_squared(plane.xyz)); 361 vec3 h = lineorigin - plane_co; 362 return -dot(plane.xyz, h) / dot(plane.xyz, linedirection); 363 } 364 365 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin, vec3 planenormal) 366 { 367 float dist = line_plane_intersect_dist(lineorigin, linedirection, planeorigin, planenormal); 368 return lineorigin + linedirection * dist; 369 } 370 371 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec4 plane) 372 { 373 float dist = line_plane_intersect_dist(lineorigin, linedirection, plane); 374 return lineorigin + linedirection * dist; 375 } 376 377 float line_aligned_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 378 { 379 /* aligned plane normal */ 380 vec3 L = planeorigin - lineorigin; 381 float diskdist = length(L); 382 vec3 planenormal = -normalize(L); 383 return -diskdist / dot(planenormal, linedirection); 384 } 385 386 vec3 line_aligned_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 387 { 388 float dist = line_aligned_plane_intersect_dist(lineorigin, linedirection, planeorigin); 389 if (dist < 0) { 390 /* if intersection is behind we fake the intersection to be 391 * really far and (hopefully) not inside the radius of interest */ 392 dist = 1e16; 393 } 394 return lineorigin + linedirection * dist; 395 } 396 397 float line_unit_sphere_intersect_dist(vec3 lineorigin, vec3 linedirection) 398 { 399 float a = dot(linedirection, linedirection); 400 float b = dot(linedirection, lineorigin); 401 float c = dot(lineorigin, lineorigin) - 1; 402 403 float dist = 1e15; 404 float determinant = b * b - a * c; 405 if (determinant >= 0) { 406 dist = (sqrt(determinant) - b) / a; 407 } 408 409 return dist; 410 } 411 412 float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection) 413 { 414 /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ */ 415 vec3 firstplane = (vec3(1.0) - lineorigin) / linedirection; 416 vec3 secondplane = (vec3(-1.0) - lineorigin) / linedirection; 417 vec3 furthestplane = max(firstplane, secondplane); 418 419 return min_v3(furthestplane); 420 } 421 422 /* Return texture coordinates to sample Surface LUT */ 423 vec2 lut_coords(float cosTheta, float roughness) 424 { 425 float theta = acos(cosTheta); 426 vec2 coords = vec2(roughness, theta / M_PI_2); 427 428 /* scale and bias coordinates, for correct filtered lookup */ 429 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 430 } 431 432 vec2 lut_coords_ltc(float cosTheta, float roughness) 433 { 434 vec2 coords = vec2(roughness, sqrt(1.0 - cosTheta)); 435 436 /* scale and bias coordinates, for correct filtered lookup */ 437 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 438 } 439 440 /* -- Tangent Space conversion -- */ 441 vec3 tangent_to_world(vec3 vector, vec3 N, vec3 T, vec3 B) 442 { 443 return T * vector.x + B * vector.y + N * vector.z; 444 } 445 446 vec3 world_to_tangent(vec3 vector, vec3 N, vec3 T, vec3 B) 447 { 448 return vec3(dot(T, vector), dot(B, vector), dot(N, vector)); 449 } 450 451 void make_orthonormal_basis(vec3 N, out vec3 T, out vec3 B) 452 { 453 vec3 UpVector = abs(N.z) < 0.99999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 454 T = normalize(cross(UpVector, N)); 455 B = cross(N, T); 456 } 457 458 /* ---- Opengl Depth conversion ---- */ 459 460 float linear_depth(bool is_persp, float z, float zf, float zn) 461 { 462 if (is_persp) { 463 return (zn * zf) / (z * (zn - zf) + zf); 464 } 465 else { 466 return (z * 2.0 - 1.0) * zf; 467 } 468 } 469 470 float buffer_depth(bool is_persp, float z, float zf, float zn) 471 { 472 if (is_persp) { 473 return (zf * (zn - z)) / (z * (zn - zf)); 474 } 475 else { 476 return (z / (zf * 2.0)) + 0.5; 477 } 478 } 479 480 float get_view_z_from_depth(float depth) 481 { 482 if (ProjectionMatrix[3][3] == 0.0) { 483 float d = 2.0 * depth - 1.0; 484 return -ProjectionMatrix[3][2] / (d + ProjectionMatrix[2][2]); 485 } 486 else { 487 return viewVecs[0].z + depth * viewVecs[1].z; 488 } 489 } 490 491 float get_depth_from_view_z(float z) 492 { 493 if (ProjectionMatrix[3][3] == 0.0) { 494 float d = (-ProjectionMatrix[3][2] / z) - ProjectionMatrix[2][2]; 495 return d * 0.5 + 0.5; 496 } 497 else { 498 return (z - viewVecs[0].z) / viewVecs[1].z; 499 } 500 } 501 502 vec2 get_uvs_from_view(vec3 view) 503 { 504 vec3 ndc = project_point(ProjectionMatrix, view); 505 return ndc.xy * 0.5 + 0.5; 506 } 507 508 vec3 get_view_space_from_depth(vec2 uvcoords, float depth) 509 { 510 if (ProjectionMatrix[3][3] == 0.0) { 511 return vec3(viewVecs[0].xy + uvcoords * viewVecs[1].xy, 1.0) * get_view_z_from_depth(depth); 512 } 513 else { 514 return viewVecs[0].xyz + vec3(uvcoords, depth) * viewVecs[1].xyz; 515 } 516 } 517 518 vec3 get_world_space_from_depth(vec2 uvcoords, float depth) 519 { 520 return (ViewMatrixInverse * vec4(get_view_space_from_depth(uvcoords, depth), 1.0)).xyz; 521 } 522 523 vec3 get_specular_reflection_dominant_dir(vec3 N, vec3 V, float roughness) 524 { 525 vec3 R = -reflect(V, N); 526 float smoothness = 1.0 - roughness; 527 float fac = smoothness * (sqrt(smoothness) + roughness); 528 return normalize(mix(N, R, fac)); 529 } 530 531 float specular_occlusion(float NV, float AO, float roughness) 532 { 533 return saturate(pow(NV + AO, roughness) - 1.0 + AO); 534 } 535 536 /* --- Refraction utils --- */ 537 538 float ior_from_f0(float f0) 539 { 540 float f = sqrt(f0); 541 return (-f - 1.0) / (f - 1.0); 542 } 543 544 float f0_from_ior(float eta) 545 { 546 float A = (eta - 1.0) / (eta + 1.0); 547 return A * A; 548 } 549 550 vec3 get_specular_refraction_dominant_dir(vec3 N, vec3 V, float roughness, float ior) 551 { 552 /* TODO: This a bad approximation. Better approximation should fit 553 * the refracted vector and roughness into the best prefiltered reflection 554 * lobe. */ 555 /* Correct the IOR for ior < 1.0 to not see the abrupt delimitation or the TIR */ 556 ior = (ior < 1.0) ? mix(ior, 1.0, roughness) : ior; 557 float eta = 1.0 / ior; 558 559 float NV = dot(N, -V); 560 561 /* Custom Refraction. */ 562 float k = 1.0 - eta * eta * (1.0 - NV * NV); 563 k = max(0.0, k); /* Only this changes. */ 564 vec3 R = eta * -V - (eta * NV + sqrt(k)) * N; 565 566 return R; 567 } 568 569 float get_btdf_lut(sampler2DArray btdf_lut_tex, float NV, float roughness, float ior) 570 { 571 const vec3 lut_scale_bias_texel_size = vec3((LUT_SIZE - 1.0), 0.5, 1.5) / LUT_SIZE; 572 573 vec3 coords; 574 /* Try to compensate for the low resolution and interpolation error. */ 575 coords.x = (ior > 1.0) ? (0.9 + lut_scale_bias_texel_size.z) + 576 (0.1 - lut_scale_bias_texel_size.z) * f0_from_ior(ior) : 577 (0.9 + lut_scale_bias_texel_size.z) * ior * ior; 578 coords.y = 1.0 - saturate(NV); 579 coords.xy *= lut_scale_bias_texel_size.x; 580 coords.xy += lut_scale_bias_texel_size.y; 581 582 const float lut_lvl_ofs = 4.0; /* First texture lvl of roughness. */ 583 const float lut_lvl_scale = 16.0; /* How many lvl of roughness in the lut. */ 584 585 float mip = roughness * lut_lvl_scale; 586 float mip_floor = floor(mip); 587 588 coords.z = lut_lvl_ofs + mip_floor + 1.0; 589 float btdf_high = textureLod(btdf_lut_tex, coords, 0.0).r; 590 591 coords.z -= 1.0; 592 float btdf_low = textureLod(btdf_lut_tex, coords, 0.0).r; 593 594 float btdf = (ior == 1.0) ? 1.0 : mix(btdf_low, btdf_high, mip - coords.z); 595 596 return btdf; 597 } 598 599 /* ---- Encode / Decode Normal buffer data ---- */ 600 /* From http://aras-p.info/texts/CompactNormalStorage.html 601 * Using Method #4: Spheremap Transform */ 602 vec2 normal_encode(vec3 n, vec3 view) 603 { 604 float p = sqrt(n.z * 8.0 + 8.0); 605 return n.xy / p + 0.5; 606 } 607 608 vec3 normal_decode(vec2 enc, vec3 view) 609 { 610 vec2 fenc = enc * 4.0 - 2.0; 611 float f = dot(fenc, fenc); 612 float g = sqrt(1.0 - f / 4.0); 613 vec3 n; 614 n.xy = fenc * g; 615 n.z = 1 - f / 2; 616 return n; 617 } 618 619 /* ---- RGBM (shared multiplier) encoding ---- */ 620 /* From http://iwasbeingirony.blogspot.fr/2010/06/difference-between-rgbm-and-rgbd.html */ 621 622 /* Higher RGBM_MAX_RANGE gives imprecision issues in low intensity. */ 623 #define RGBM_MAX_RANGE 512.0 624 625 vec4 rgbm_encode(vec3 rgb) 626 { 627 float maxRGB = max_v3(rgb); 628 float M = maxRGB / RGBM_MAX_RANGE; 629 M = ceil(M * 255.0) / 255.0; 630 return vec4(rgb / (M * RGBM_MAX_RANGE), M); 631 } 632 633 vec3 rgbm_decode(vec4 data) 634 { 635 return data.rgb * (data.a * RGBM_MAX_RANGE); 636 } 637 638 /* ---- RGBE (shared exponent) encoding ---- */ 639 vec4 rgbe_encode(vec3 rgb) 640 { 641 float maxRGB = max_v3(rgb); 642 float fexp = ceil(log2(maxRGB)); 643 return vec4(rgb / exp2(fexp), (fexp + 128.0) / 255.0); 644 } 645 646 vec3 rgbe_decode(vec4 data) 647 { 648 float fexp = data.a * 255.0 - 128.0; 649 return data.rgb * exp2(fexp); 650 } 651 652 #if 1 653 # define irradiance_encode rgbe_encode 654 # define irradiance_decode rgbe_decode 655 #else /* No ecoding (when using floating point format) */ 656 # define irradiance_encode(X) (X).rgbb 657 # define irradiance_decode(X) (X).rgb 658 #endif 659 660 /* Irradiance Visibility Encoding */ 661 #if 1 662 vec4 visibility_encode(vec2 accum, float range) 663 { 664 accum /= range; 665 666 vec4 data; 667 data.x = fract(accum.x); 668 data.y = floor(accum.x) / 255.0; 669 data.z = fract(accum.y); 670 data.w = floor(accum.y) / 255.0; 671 672 return data; 673 } 674 675 vec2 visibility_decode(vec4 data, float range) 676 { 677 return (data.xz + data.yw * 255.0) * range; 678 } 679 #else /* No ecoding (when using floating point format) */ 680 vec4 visibility_encode(vec2 accum, float range) 681 { 682 return accum.xyxy; 683 } 684 685 vec2 visibility_decode(vec4 data, float range) 686 { 687 return data.xy; 688 } 689 #endif 690 691 /* Fresnel monochromatic, perfect mirror */ 692 float F_eta(float eta, float cos_theta) 693 { 694 /* compute fresnel reflectance without explicitly computing 695 * the refracted direction */ 696 float c = abs(cos_theta); 697 float g = eta * eta - 1.0 + c * c; 698 float result; 699 700 if (g > 0.0) { 701 g = sqrt(g); 702 vec2 g_c = vec2(g) + vec2(c, -c); 703 float A = g_c.y / g_c.x; 704 A *= A; 705 g_c *= c; 706 float B = (g_c.y - 1.0) / (g_c.x + 1.0); 707 B *= B; 708 result = 0.5 * A * (1.0 + B); 709 } 710 else { 711 result = 1.0; /* TIR (no refracted component) */ 712 } 713 714 return result; 715 } 716 717 /* Fresnel color blend base on fresnel factor */ 718 vec3 F_color_blend(float eta, float fresnel, vec3 f0_color) 719 { 720 float f0 = F_eta(eta, 1.0); 721 float fac = saturate((fresnel - f0) / max(1e-8, 1.0 - f0)); 722 return mix(f0_color, vec3(1.0), fac); 723 } 724 725 /* Fresnel */ 726 vec3 F_schlick(vec3 f0, float cos_theta) 727 { 728 float fac = 1.0 - cos_theta; 729 float fac2 = fac * fac; 730 fac = fac2 * fac2 * fac; 731 732 /* Unreal specular matching : if specular color is below 2% intensity, 733 * (using green channel for intensity) treat as shadowning */ 734 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * fac + (1.0 - fac) * f0; 735 } 736 737 /* Fresnel approximation for LTC area lights (not MRP) */ 738 vec3 F_area(vec3 f0, vec2 lut) 739 { 740 /* Unreal specular matching : if specular color is below 2% intensity, 741 * treat as shadowning */ 742 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 743 } 744 745 /* Fresnel approximation for IBL */ 746 vec3 F_ibl(vec3 f0, vec2 lut) 747 { 748 /* Unreal specular matching : if specular color is below 2% intensity, 749 * treat as shadowning */ 750 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 751 } 752 753 /* GGX */ 754 float D_ggx_opti(float NH, float a2) 755 { 756 float tmp = (NH * a2 - NH) * NH + 1.0; 757 return M_PI * tmp * tmp; /* Doing RCP and mul a2 at the end */ 758 } 759 760 float G1_Smith_GGX(float NX, float a2) 761 { 762 /* Using Brian Karis approach and refactoring by NX/NX 763 * this way the (2*NL)*(2*NV) in G = G1(V) * G1(L) gets canceled by the brdf denominator 4*NL*NV 764 * Rcp is done on the whole G later 765 * Note that this is not convenient for the transmission formula */ 766 return NX + sqrt(NX * (NX - NX * a2) + a2); 767 /* return 2 / (1 + sqrt(1 + a2 * (1 - NX*NX) / (NX*NX) ) ); /* Reference function */ 768 } 769 770 float bsdf_ggx(vec3 N, vec3 L, vec3 V, float roughness) 771 { 772 float a = roughness; 773 float a2 = a * a; 774 775 vec3 H = normalize(L + V); 776 float NH = max(dot(N, H), 1e-8); 777 float NL = max(dot(N, L), 1e-8); 778 float NV = max(dot(N, V), 1e-8); 779 780 float G = G1_Smith_GGX(NV, a2) * G1_Smith_GGX(NL, a2); /* Doing RCP at the end */ 781 float D = D_ggx_opti(NH, a2); 782 783 /* Denominator is canceled by G1_Smith */ 784 /* bsdf = D * G / (4.0 * NL * NV); /* Reference function */ 785 return NL * a2 / (D * G); /* NL to Fit cycles Equation : line. 345 in bsdf_microfacet.h */ 786 } 787 788 void accumulate_light(vec3 light, float fac, inout vec4 accum) 789 { 790 accum += vec4(light, 1.0) * min(fac, (1.0 - accum.a)); 791 } 792 793 /* ----------- Cone Aperture Approximation --------- */ 794 795 /* Return a fitted cone angle given the input roughness */ 796 float cone_cosine(float r) 797 { 798 /* Using phong gloss 799 * roughness = sqrt(2/(gloss+2)) */ 800 float gloss = -2 + 2 / (r * r); 801 /* Drobot 2014 in GPUPro5 */ 802 // return cos(2.0 * sqrt(2.0 / (gloss + 2))); 803 /* Uludag 2014 in GPUPro5 */ 804 // return pow(0.244, 1 / (gloss + 1)); 805 /* Jimenez 2016 in Practical Realtime Strategies for Accurate Indirect Occlusion*/ 806 return exp2(-3.32193 * r * r); 807 } 808 809 /* --------- Closure ---------- */ 810 #ifdef VOLUMETRICS 811 812 struct Closure { 813 vec3 absorption; 814 vec3 scatter; 815 vec3 emission; 816 float anisotropy; 817 }; 818 819 # define CLOSURE_DEFAULT Closure(vec3(0.0), vec3(0.0), vec3(0.0), 0.0) 820 821 Closure closure_mix(Closure cl1, Closure cl2, float fac) 822 { 823 Closure cl; 824 cl.absorption = mix(cl1.absorption, cl2.absorption, fac); 825 cl.scatter = mix(cl1.scatter, cl2.scatter, fac); 826 cl.emission = mix(cl1.emission, cl2.emission, fac); 827 cl.anisotropy = mix(cl1.anisotropy, cl2.anisotropy, fac); 828 return cl; 829 } 830 831 Closure closure_add(Closure cl1, Closure cl2) 832 { 833 Closure cl; 834 cl.absorption = cl1.absorption + cl2.absorption; 835 cl.scatter = cl1.scatter + cl2.scatter; 836 cl.emission = cl1.emission + cl2.emission; 837 cl.anisotropy = (cl1.anisotropy + cl2.anisotropy) / 2.0; /* Average phase (no multi lobe) */ 838 return cl; 839 } 840 841 Closure closure_emission(vec3 rgb) 842 { 843 Closure cl = CLOSURE_DEFAULT; 844 cl.emission = rgb; 845 return cl; 846 } 847 848 #else /* VOLUMETRICS */ 849 850 struct Closure { 851 vec3 radiance; 852 float opacity; 853 # ifdef USE_SSS 854 vec4 sss_data; 855 # ifdef USE_SSS_ALBEDO 856 vec3 sss_albedo; 857 # endif 858 # endif 859 vec4 ssr_data; 860 vec2 ssr_normal; 861 int ssr_id; 862 }; 863 864 /* This is hacking ssr_id to tag transparent bsdf */ 865 # define TRANSPARENT_CLOSURE_FLAG -2 866 # define REFRACT_CLOSURE_FLAG -3 867 # define NO_SSR -999 868 869 # ifdef USE_SSS 870 # ifdef USE_SSS_ALBEDO 871 # define CLOSURE_DEFAULT \ 872 Closure(vec3(0.0), 1.0, vec4(0.0), vec3(0.0), vec4(0.0), vec2(0.0), -1) 873 # else 874 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec4(0.0), vec2(0.0), -1) 875 # endif 876 # else 877 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec2(0.0), -1) 878 # endif 879 880 uniform int outputSsrId; 881 882 Closure closure_mix(Closure cl1, Closure cl2, float fac) 883 { 884 Closure cl; 885 886 if (cl1.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 887 cl1.ssr_normal = cl2.ssr_normal; 888 cl1.ssr_data = cl2.ssr_data; 889 cl1.ssr_id = cl2.ssr_id; 890 # ifdef USE_SSS 891 cl1.sss_data = cl2.sss_data; 892 # ifdef USE_SSS_ALBEDO 893 cl1.sss_albedo = cl2.sss_albedo; 894 # endif 895 # endif 896 } 897 if (cl2.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 898 cl2.ssr_normal = cl1.ssr_normal; 899 cl2.ssr_data = cl1.ssr_data; 900 cl2.ssr_id = cl1.ssr_id; 901 # ifdef USE_SSS 902 cl2.sss_data = cl1.sss_data; 903 # ifdef USE_SSS_ALBEDO 904 cl2.sss_albedo = cl1.sss_albedo; 905 # endif 906 # endif 907 } 908 909 /* When mixing SSR don't blend roughness. 910 * 911 * It makes no sense to mix them really, so we take either one of them and 912 * tone down its specularity (ssr_data.xyz) while keeping its roughness (ssr_data.w). 913 */ 914 if (cl1.ssr_id == outputSsrId) { 915 cl.ssr_data = mix(cl1.ssr_data.xyzw, vec4(vec3(0.0), cl1.ssr_data.w), fac); 916 cl.ssr_normal = cl1.ssr_normal; 917 cl.ssr_id = cl1.ssr_id; 918 } 919 else { 920 cl.ssr_data = mix(vec4(vec3(0.0), cl2.ssr_data.w), cl2.ssr_data.xyzw, fac); 921 cl.ssr_normal = cl2.ssr_normal; 922 cl.ssr_id = cl2.ssr_id; 923 } 924 925 cl.opacity = mix(cl1.opacity, cl2.opacity, fac); 926 cl.radiance = mix(cl1.radiance * cl1.opacity, cl2.radiance * cl2.opacity, fac); 927 cl.radiance /= max(1e-8, cl.opacity); 928 929 # ifdef USE_SSS 930 cl.sss_data.rgb = mix(cl1.sss_data.rgb, cl2.sss_data.rgb, fac); 931 cl.sss_data.a = (cl1.sss_data.a > 0.0) ? cl1.sss_data.a : cl2.sss_data.a; 932 # ifdef USE_SSS_ALBEDO 933 /* TODO Find a solution to this. Dither? */ 934 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 935 # endif 936 # endif 937 938 return cl; 939 } 940 941 Closure closure_add(Closure cl1, Closure cl2) 942 { 943 Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; 944 cl.radiance = cl1.radiance + cl2.radiance; 945 # ifdef USE_SSS 946 cl.sss_data = (cl1.sss_data.a > 0.0) ? cl1.sss_data : cl2.sss_data; 947 /* Add radiance that was supposed to be filtered but was rejected. */ 948 cl.radiance += (cl1.sss_data.a > 0.0) ? cl2.sss_data.rgb : cl1.sss_data.rgb; 949 # ifdef USE_SSS_ALBEDO 950 /* TODO Find a solution to this. Dither? */ 951 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 952 # endif 953 # endif 954 cl.opacity = saturate(cl1.opacity + cl2.opacity); 955 return cl; 956 } 957 958 Closure closure_emission(vec3 rgb) 959 { 960 Closure cl = CLOSURE_DEFAULT; 961 cl.radiance = rgb; 962 return cl; 963 } 964 965 # if defined(MESH_SHADER) && !defined(USE_ALPHA_HASH) && !defined(USE_ALPHA_CLIP) && \ 966 !defined(SHADOW_SHADER) && !defined(USE_MULTIPLY) 967 layout(location = 0) out vec4 fragColor; 968 layout(location = 1) out vec4 ssrNormals; 969 layout(location = 2) out vec4 ssrData; 970 # ifdef USE_SSS 971 layout(location = 3) out vec4 sssData; 972 # ifdef USE_SSS_ALBEDO 973 layout(location = 4) out vec4 sssAlbedo; 974 # endif /* USE_SSS_ALBEDO */ 975 # endif /* USE_SSS */ 976 977 Closure nodetree_exec(void); /* Prototype */ 978 979 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 980 /* Prototype because this file is included before volumetric_lib.glsl */ 981 vec4 volumetric_resolve(vec4 scene_color, vec2 frag_uvs, float frag_depth); 982 # endif 983 984 # define NODETREE_EXEC 985 void main() 986 { 987 Closure cl = nodetree_exec(); 988 # ifndef USE_ALPHA_BLEND 989 /* Prevent alpha hash material writing into alpha channel. */ 990 cl.opacity = 1.0; 991 # endif 992 993 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 994 /* XXX fragile, better use real viewport resolution */ 995 vec2 uvs = gl_FragCoord.xy / vec2(2 * textureSize(maxzBuffer, 0).xy); 996 fragColor.rgb = volumetric_resolve(vec4(cl.radiance, cl.opacity), uvs, gl_FragCoord.z).rgb; 997 fragColor.a = cl.opacity; 998 # else 999 fragColor = vec4(cl.radiance, cl.opacity); 1000 # endif 1001 1002 ssrNormals = cl.ssr_normal.xyyy; 1003 ssrData = cl.ssr_data; 1004 # ifdef USE_SSS 1005 sssData = cl.sss_data; 1006 # ifdef USE_SSS_ALBEDO 1007 sssAlbedo = cl.sss_albedo.rgbb; 1008 # endif 1009 # endif 1010 1011 /* For Probe capture */ 1012 # ifdef USE_SSS 1013 # ifdef USE_SSS_ALBEDO 1014 fragColor.rgb += cl.sss_data.rgb * cl.sss_albedo.rgb * float(!sssToggle); 1015 # else 1016 fragColor.rgb += cl.sss_data.rgb * float(!sssToggle); 1017 # endif 1018 # endif 1019 } 1020 1021 # endif /* MESH_SHADER && !SHADOW_SHADER */ 1022 1023 #endif /* VOLUMETRICS */ 1024 1025 Closure nodetree_exec(void); /* Prototype */ 1026 1027 /* TODO find a better place */ 1028 #ifdef USE_MULTIPLY 1029 1030 out vec4 fragColor; 1031 1032 # define NODETREE_EXEC 1033 void main() 1034 { 1035 Closure cl = nodetree_exec(); 1036 fragColor = vec4(mix(vec3(1.0), cl.radiance, cl.opacity), 1.0); 1037 } 1038 #endif 1039 1040 uniform sampler1D texHammersley; 1041 uniform sampler2D texJitter; 1042 uniform float sampleCount; 1043 uniform float invSampleCount; 1044 1045 vec2 jitternoise = vec2(0.0); 1046 1047 #ifndef UTIL_TEX 1048 # define UTIL_TEX 1049 uniform sampler2DArray utilTex; 1050 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 1051 #endif /* UTIL_TEX */ 1052 1053 void setup_noise(void) 1054 { 1055 jitternoise = texelfetch_noise_tex(gl_FragCoord.xy).rg; /* Global variable */ 1056 } 1057 1058 #ifdef HAMMERSLEY_SIZE 1059 vec3 hammersley_3d(float i, float invsamplenbr) 1060 { 1061 vec3 Xi; /* Theta, cos(Phi), sin(Phi) */ 1062 1063 Xi.x = i * invsamplenbr; /* i/samples */ 1064 Xi.x = fract(Xi.x + jitternoise.x); 1065 1066 int u = int(mod(i + jitternoise.y * HAMMERSLEY_SIZE, HAMMERSLEY_SIZE)); 1067 1068 Xi.yz = texelFetch(texHammersley, u, 0).rg; 1069 1070 return Xi; 1071 } 1072 1073 vec3 hammersley_3d(float i) 1074 { 1075 return hammersley_3d(i, invSampleCount); 1076 } 1077 #endif 1078 1079 /* -------------- BSDFS -------------- */ 1080 1081 float pdf_ggx_reflect(float NH, float a2) 1082 { 1083 return NH * a2 / D_ggx_opti(NH, a2); 1084 } 1085 1086 float pdf_hemisphere() 1087 { 1088 return 0.5 * M_1_PI; 1089 } 1090 1091 vec3 sample_ggx(vec3 rand, float a2) 1092 { 1093 /* Theta is the aperture angle of the cone */ 1094 float z = sqrt((1.0 - rand.x) / (1.0 + a2 * rand.x - rand.x)); /* cos theta */ 1095 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1096 float x = r * rand.y; 1097 float y = r * rand.z; 1098 1099 /* Microfacet Normal */ 1100 return vec3(x, y, z); 1101 } 1102 1103 vec3 sample_ggx(vec3 rand, float a2, vec3 N, vec3 T, vec3 B, out float NH) 1104 { 1105 vec3 Ht = sample_ggx(rand, a2); 1106 NH = Ht.z; 1107 return tangent_to_world(Ht, N, T, B); 1108 } 1109 1110 #ifdef HAMMERSLEY_SIZE 1111 vec3 sample_ggx(float nsample, float a2, vec3 N, vec3 T, vec3 B) 1112 { 1113 vec3 Xi = hammersley_3d(nsample); 1114 vec3 Ht = sample_ggx(Xi, a2); 1115 return tangent_to_world(Ht, N, T, B); 1116 } 1117 1118 vec3 sample_hemisphere(float nsample, vec3 N, vec3 T, vec3 B) 1119 { 1120 vec3 Xi = hammersley_3d(nsample); 1121 1122 float z = Xi.x; /* cos theta */ 1123 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1124 float x = r * Xi.y; 1125 float y = r * Xi.z; 1126 1127 vec3 Ht = vec3(x, y, z); 1128 1129 return tangent_to_world(Ht, N, T, B); 1130 } 1131 1132 vec3 sample_cone(float nsample, float angle, vec3 N, vec3 T, vec3 B) 1133 { 1134 vec3 Xi = hammersley_3d(nsample); 1135 1136 float z = cos(angle * Xi.x); /* cos theta */ 1137 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1138 float x = r * Xi.y; 1139 float y = r * Xi.z; 1140 1141 vec3 Ht = vec3(x, y, z); 1142 1143 return tangent_to_world(Ht, N, T, B); 1144 } 1145 #endif 1146 1147 uniform samplerCube probeHdr; 1148 uniform float roughnessSquared; 1149 uniform float texelSize; 1150 uniform float lodFactor; 1151 uniform float lodMax; 1152 uniform float paddingSize; 1153 uniform float intensityFac; 1154 uniform float fireflyFactor; 1155 1156 in vec3 worldPosition; 1157 1158 out vec4 FragColor; 1159 1160 float brightness(vec3 c) 1161 { 1162 return max(max(c.r, c.g), c.b); 1163 } 1164 1165 vec3 octahedral_to_cubemap_proj(vec2 co) 1166 { 1167 co = co * 2.0 - 1.0; 1168 1169 vec2 abs_co = abs(co); 1170 vec3 v = vec3(co, 1.0 - (abs_co.x + abs_co.y)); 1171 1172 if (abs_co.x + abs_co.y > 1.0) { 1173 v.xy = (abs(co.yx) - 1.0) * -sign(co.xy); 1174 } 1175 1176 return v; 1177 } 1178 1179 void main() 1180 { 1181 vec2 uvs = gl_FragCoord.xy * texelSize; 1182 1183 /* Add a N pixel border to ensure filtering is correct 1184 * for N mipmap levels. */ 1185 uvs = (uvs - paddingSize) / (1.0 - 2.0 * paddingSize); 1186 1187 /* edge mirroring : only mirror if directly adjacent 1188 * (not diagonally adjacent) */ 1189 vec2 m = abs(uvs - 0.5) + 0.5; 1190 vec2 f = floor(m); 1191 if (f.x - f.y != 0.0) { 1192 uvs = 1.0 - uvs; 1193 } 1194 1195 /* clamp to [0-1] */ 1196 uvs = fract(uvs); 1197 1198 /* get cubemap vector */ 1199 vec3 cubevec = octahedral_to_cubemap_proj(uvs); 1200 1201 vec3 N, T, B, V; 1202 1203 vec3 R = normalize(cubevec); 1204 1205 /* Isotropic assumption */ 1206 N = V = R; 1207 1208 make_orthonormal_basis(N, T, B); /* Generate tangent space */ 1209 1210 /* Noise to dither the samples */ 1211 /* Note : ghosting is better looking than noise. */ 1212 // setup_noise(); 1213 1214 /* Integrating Envmap */ 1215 float weight = 0.0; 1216 vec3 out_radiance = vec3(0.0); 1217 for (float i = 0; i < sampleCount; i++) { 1218 vec3 H = sample_ggx(i, roughnessSquared, N, T, B); /* Microfacet normal */ 1219 vec3 L = -reflect(V, H); 1220 float NL = dot(N, L); 1221 1222 if (NL > 0.0) { 1223 float NH = max(1e-8, dot(N, H)); /* cosTheta */ 1224 1225 /* Coarse Approximation of the mapping distortion 1226 * Unit Sphere -> Cubemap Face */ 1227 const float dist = 4.0 * M_PI / 6.0; 1228 float pdf = pdf_ggx_reflect(NH, roughnessSquared); 1229 /* http://http.developer.nvidia.com/GPUGems3/gpugems3_ch20.html : Equation 13 */ 1230 float lod = clamp(lodFactor - 0.5 * log2(pdf * dist), 0.0, lodMax); 1231 1232 vec3 l_col = textureLod(probeHdr, L, lod).rgb; 1233 1234 /* Clamped brightness. */ 1235 float luma = max(1e-8, brightness(l_col)); 1236 l_col *= 1.0 - max(0.0, luma - fireflyFactor) / luma; 1237 1238 out_radiance += l_col * NL; 1239 weight += NL; 1240 } 1241 } 1242 1243 FragColor = vec4(intensityFac * out_radiance / weight, 1.0); 1244 } 0(965) : error C0105: Syntax error in #if 0(965) : error C0105: Syntax error in #if 0(966) : error C0000: syntax error, unexpected '!' at token "!" 0(1179) : error C1013: function "main" is already defined at 0(985) GPUShader: compile error: ===== shader string 1 ==== 1 #version 330 ===== shader string 2 ==== 2 #define GPU_FRAGMENT_SHADER ===== shader string 3 ==== 3 #extension GL_ARB_texture_gather: enable 4 #define GPU_ARB_texture_gather 5 #extension GL_ARB_texture_query_lod: enable ===== shader string 4 ==== 6 #define GPU_NVIDIA 7 #define OS_WIN ===== shader string 5 ==== 8 #define HAMMERSLEY_SIZE 1024 9 #define IRRADIANCE_HL2 10 #define NOISE_SIZE 64 ===== shader string 6 ==== 11 /* keep in sync with DRWManager.view_data */ 12 layout(std140) uniform viewBlock 13 { 14 /* Same order as DRWViewportMatrixType */ 15 mat4 ViewProjectionMatrix; 16 mat4 ViewProjectionMatrixInverse; 17 mat4 ViewMatrix; 18 mat4 ViewMatrixInverse; 19 mat4 ProjectionMatrix; 20 mat4 ProjectionMatrixInverse; 21 22 vec4 CameraTexCoFactors; 23 24 vec4 clipPlanes[2]; 25 }; 26 27 layout(std140) uniform common_block 28 { 29 mat4 pastViewProjectionMatrix; 30 vec4 viewVecs[2]; 31 vec2 mipRatio[10]; /* To correct mip level texel mis-alignement */ 32 /* Ambient Occlusion */ 33 vec4 aoParameters[2]; 34 /* Volumetric */ 35 ivec4 volTexSize; 36 vec4 volDepthParameters; /* Parameters to the volume Z equation */ 37 vec4 volInvTexSize; 38 vec4 volJitter; 39 vec4 volCoordScale; /* To convert volume uvs to screen uvs */ 40 float volHistoryAlpha; 41 float volLightClamp; 42 float volShadowSteps; 43 bool volUseLights; 44 /* Screen Space Reflections */ 45 vec4 ssrParameters; 46 float ssrBorderFac; 47 float ssrMaxRoughness; 48 float ssrFireflyFac; 49 float ssrBrdfBias; 50 bool ssrToggle; 51 /* SubSurface Scattering */ 52 float sssJitterThreshold; 53 bool sssToggle; 54 /* Specular */ 55 bool specToggle; 56 /* Lights */ 57 int laNumLight; 58 /* Probes */ 59 int prbNumPlanar; 60 int prbNumRenderCube; 61 int prbNumRenderGrid; 62 int prbIrradianceVisSize; 63 float prbIrradianceSmooth; 64 float prbLodCubeMax; 65 float prbLodPlanarMax; 66 /* Misc*/ 67 int hizMipOffset; 68 int rayType; 69 float rayDepth; 70 }; 71 72 /* rayType (keep in sync with ray_type) */ 73 #define EEVEE_RAY_CAMERA 0 74 #define EEVEE_RAY_SHADOW 1 75 #define EEVEE_RAY_DIFFUSE 2 76 #define EEVEE_RAY_GLOSSY 3 77 78 /* aoParameters */ 79 #define aoDistance aoParameters[0].x 80 #define aoSamples aoParameters[0].y /* UNUSED */ 81 #define aoFactor aoParameters[0].z 82 #define aoInvSamples aoParameters[0].w /* UNUSED */ 83 84 #define aoOffset aoParameters[1].x /* UNUSED */ 85 #define aoBounceFac aoParameters[1].y 86 #define aoQuality aoParameters[1].z 87 #define aoSettings aoParameters[1].w 88 89 /* ssrParameters */ 90 #define ssrQuality ssrParameters.x 91 #define ssrThickness ssrParameters.y 92 #define ssrPixelSize ssrParameters.zw 93 94 #define M_PI 3.14159265358979323846 /* pi */ 95 #define M_2PI 6.28318530717958647692 /* 2*pi */ 96 #define M_PI_2 1.57079632679489661923 /* pi/2 */ 97 #define M_1_PI 0.318309886183790671538 /* 1/pi */ 98 #define M_1_2PI 0.159154943091895335768 /* 1/(2*pi) */ 99 #define M_1_PI2 0.101321183642337771443 /* 1/(pi^2) */ 100 101 #define LUT_SIZE 64 102 103 /* Buffers */ 104 uniform sampler2D colorBuffer; 105 uniform sampler2D depthBuffer; 106 uniform sampler2D maxzBuffer; 107 uniform sampler2D minzBuffer; 108 uniform sampler2DArray planarDepth; 109 110 #define cameraForward normalize(ViewMatrixInverse[2].xyz) 111 #define cameraPos ViewMatrixInverse[3].xyz 112 #define cameraVec \ 113 ((ProjectionMatrix[3][3] == 0.0) ? normalize(cameraPos - worldPosition) : cameraForward) 114 #define viewCameraVec \ 115 ((ProjectionMatrix[3][3] == 0.0) ? normalize(-viewPosition) : vec3(0.0, 0.0, 1.0)) 116 117 /* ------- Structures -------- */ 118 119 /* ------ Lights ----- */ 120 struct LightData { 121 vec4 position_influence; /* w : InfluenceRadius (inversed and squared) */ 122 vec4 color_spec; /* w : Spec Intensity */ 123 vec4 spotdata_radius_shadow; /* x : spot size, y : spot blend, z : radius, w: shadow id */ 124 vec4 rightvec_sizex; /* xyz: Normalized up vector, w: area size X or spot scale X */ 125 vec4 upvec_sizey; /* xyz: Normalized right vector, w: area size Y or spot scale Y */ 126 vec4 forwardvec_type; /* xyz: Normalized forward vector, w: Light Type */ 127 }; 128 129 /* convenience aliases */ 130 #define l_color color_spec.rgb 131 #define l_spec color_spec.a 132 #define l_position position_influence.xyz 133 #define l_influence position_influence.w 134 #define l_sizex rightvec_sizex.w 135 #define l_sizey upvec_sizey.w 136 #define l_right rightvec_sizex.xyz 137 #define l_up upvec_sizey.xyz 138 #define l_forward forwardvec_type.xyz 139 #define l_type forwardvec_type.w 140 #define l_spot_size spotdata_radius_shadow.x 141 #define l_spot_blend spotdata_radius_shadow.y 142 #define l_radius spotdata_radius_shadow.z 143 #define l_shadowid spotdata_radius_shadow.w 144 145 /* ------ Shadows ----- */ 146 #ifndef MAX_CASCADE_NUM 147 # define MAX_CASCADE_NUM 4 148 #endif 149 150 struct ShadowData { 151 vec4 near_far_bias_exp; 152 vec4 shadow_data_start_end; 153 vec4 contact_shadow_data; 154 }; 155 156 struct ShadowCubeData { 157 vec4 position; 158 }; 159 160 struct ShadowCascadeData { 161 mat4 shadowmat[MAX_CASCADE_NUM]; 162 vec4 split_start_distances; 163 vec4 split_end_distances; 164 }; 165 166 /* convenience aliases */ 167 #define sh_near near_far_bias_exp.x 168 #define sh_far near_far_bias_exp.y 169 #define sh_bias near_far_bias_exp.z 170 #define sh_exp near_far_bias_exp.w 171 #define sh_bleed near_far_bias_exp.w 172 #define sh_tex_start shadow_data_start_end.x 173 #define sh_data_start shadow_data_start_end.y 174 #define sh_multi_nbr shadow_data_start_end.z 175 #define sh_blur shadow_data_start_end.w 176 #define sh_contact_dist contact_shadow_data.x 177 #define sh_contact_offset contact_shadow_data.y 178 #define sh_contact_spread contact_shadow_data.z 179 #define sh_contact_thickness contact_shadow_data.w 180 181 /* ------- Convenience functions --------- */ 182 183 vec3 mul(mat3 m, vec3 v) 184 { 185 return m * v; 186 } 187 mat3 mul(mat3 m1, mat3 m2) 188 { 189 return m1 * m2; 190 } 191 vec3 transform_direction(mat4 m, vec3 v) 192 { 193 return mat3(m) * v; 194 } 195 vec3 transform_point(mat4 m, vec3 v) 196 { 197 return (m * vec4(v, 1.0)).xyz; 198 } 199 vec3 project_point(mat4 m, vec3 v) 200 { 201 vec4 tmp = m * vec4(v, 1.0); 202 return tmp.xyz / tmp.w; 203 } 204 205 #define min3(a, b, c) min(a, min(b, c)) 206 #define min4(a, b, c, d) min(a, min3(b, c, d)) 207 #define min5(a, b, c, d, e) min(a, min4(b, c, d, e)) 208 #define min6(a, b, c, d, e, f) min(a, min5(b, c, d, e, f)) 209 #define min7(a, b, c, d, e, f, g) min(a, min6(b, c, d, e, f, g)) 210 #define min8(a, b, c, d, e, f, g, h) min(a, min7(b, c, d, e, f, g, h)) 211 #define min9(a, b, c, d, e, f, g, h, i) min(a, min8(b, c, d, e, f, g, h, i)) 212 213 #define max3(a, b, c) max(a, max(b, c)) 214 #define max4(a, b, c, d) max(a, max3(b, c, d)) 215 #define max5(a, b, c, d, e) max(a, max4(b, c, d, e)) 216 #define max6(a, b, c, d, e, f) max(a, max5(b, c, d, e, f)) 217 #define max7(a, b, c, d, e, f, g) max(a, max6(b, c, d, e, f, g)) 218 #define max8(a, b, c, d, e, f, g, h) max(a, max7(b, c, d, e, f, g, h)) 219 #define max9(a, b, c, d, e, f, g, h, i) max(a, max8(b, c, d, e, f, g, h, i)) 220 221 #define avg3(a, b, c) (a + b + c) * (1.0 / 3.0) 222 #define avg4(a, b, c, d) (a + b + c + d) * (1.0 / 4.0) 223 #define avg5(a, b, c, d, e) (a + b + c + d + e) * (1.0 / 5.0) 224 #define avg6(a, b, c, d, e, f) (a + b + c + d + e + f) * (1.0 / 6.0) 225 #define avg7(a, b, c, d, e, f, g) (a + b + c + d + e + f + g) * (1.0 / 7.0) 226 #define avg8(a, b, c, d, e, f, g, h) (a + b + c + d + e + f + g + h) * (1.0 / 8.0) 227 #define avg9(a, b, c, d, e, f, g, h, i) (a + b + c + d + e + f + g + h + i) * (1.0 / 9.0) 228 229 float min_v2(vec2 v) 230 { 231 return min(v.x, v.y); 232 } 233 float min_v3(vec3 v) 234 { 235 return min(v.x, min(v.y, v.z)); 236 } 237 float max_v2(vec2 v) 238 { 239 return max(v.x, v.y); 240 } 241 float max_v3(vec3 v) 242 { 243 return max(v.x, max(v.y, v.z)); 244 } 245 246 float sum(vec2 v) 247 { 248 return dot(vec2(1.0), v); 249 } 250 float sum(vec3 v) 251 { 252 return dot(vec3(1.0), v); 253 } 254 float sum(vec4 v) 255 { 256 return dot(vec4(1.0), v); 257 } 258 259 float saturate(float a) 260 { 261 return clamp(a, 0.0, 1.0); 262 } 263 vec2 saturate(vec2 a) 264 { 265 return clamp(a, 0.0, 1.0); 266 } 267 vec3 saturate(vec3 a) 268 { 269 return clamp(a, 0.0, 1.0); 270 } 271 vec4 saturate(vec4 a) 272 { 273 return clamp(a, 0.0, 1.0); 274 } 275 276 float distance_squared(vec2 a, vec2 b) 277 { 278 a -= b; 279 return dot(a, a); 280 } 281 float distance_squared(vec3 a, vec3 b) 282 { 283 a -= b; 284 return dot(a, a); 285 } 286 float len_squared(vec3 a) 287 { 288 return dot(a, a); 289 } 290 291 float inverse_distance(vec3 V) 292 { 293 return max(1 / length(V), 1e-8); 294 } 295 296 vec2 mip_ratio_interp(float mip) 297 { 298 float low_mip = floor(mip); 299 return mix(mipRatio[int(low_mip)], mipRatio[int(low_mip + 1.0)], mip - low_mip); 300 } 301 302 /* ------- RNG ------- */ 303 304 float wang_hash_noise(uint s) 305 { 306 s = (s ^ 61u) ^ (s >> 16u); 307 s *= 9u; 308 s = s ^ (s >> 4u); 309 s *= 0x27d4eb2du; 310 s = s ^ (s >> 15u); 311 312 return fract(float(s) / 4294967296.0); 313 } 314 315 /* ------- Fast Math ------- */ 316 317 /* [Drobot2014a] Low Level Optimizations for GCN */ 318 float fast_sqrt(float v) 319 { 320 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 321 } 322 323 vec2 fast_sqrt(vec2 v) 324 { 325 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 326 } 327 328 /* [Eberly2014] GPGPU Programming for Games and Science */ 329 float fast_acos(float v) 330 { 331 float res = -0.156583 * abs(v) + M_PI_2; 332 res *= fast_sqrt(1.0 - abs(v)); 333 return (v >= 0) ? res : M_PI - res; 334 } 335 336 vec2 fast_acos(vec2 v) 337 { 338 vec2 res = -0.156583 * abs(v) + M_PI_2; 339 res *= fast_sqrt(1.0 - abs(v)); 340 v.x = (v.x >= 0) ? res.x : M_PI - res.x; 341 v.y = (v.y >= 0) ? res.y : M_PI - res.y; 342 return v; 343 } 344 345 float point_plane_projection_dist(vec3 lineorigin, vec3 planeorigin, vec3 planenormal) 346 { 347 return dot(planenormal, planeorigin - lineorigin); 348 } 349 350 float line_plane_intersect_dist(vec3 lineorigin, 351 vec3 linedirection, 352 vec3 planeorigin, 353 vec3 planenormal) 354 { 355 return dot(planenormal, planeorigin - lineorigin) / dot(planenormal, linedirection); 356 } 357 358 float line_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec4 plane) 359 { 360 vec3 plane_co = plane.xyz * (-plane.w / len_squared(plane.xyz)); 361 vec3 h = lineorigin - plane_co; 362 return -dot(plane.xyz, h) / dot(plane.xyz, linedirection); 363 } 364 365 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin, vec3 planenormal) 366 { 367 float dist = line_plane_intersect_dist(lineorigin, linedirection, planeorigin, planenormal); 368 return lineorigin + linedirection * dist; 369 } 370 371 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec4 plane) 372 { 373 float dist = line_plane_intersect_dist(lineorigin, linedirection, plane); 374 return lineorigin + linedirection * dist; 375 } 376 377 float line_aligned_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 378 { 379 /* aligned plane normal */ 380 vec3 L = planeorigin - lineorigin; 381 float diskdist = length(L); 382 vec3 planenormal = -normalize(L); 383 return -diskdist / dot(planenormal, linedirection); 384 } 385 386 vec3 line_aligned_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 387 { 388 float dist = line_aligned_plane_intersect_dist(lineorigin, linedirection, planeorigin); 389 if (dist < 0) { 390 /* if intersection is behind we fake the intersection to be 391 * really far and (hopefully) not inside the radius of interest */ 392 dist = 1e16; 393 } 394 return lineorigin + linedirection * dist; 395 } 396 397 float line_unit_sphere_intersect_dist(vec3 lineorigin, vec3 linedirection) 398 { 399 float a = dot(linedirection, linedirection); 400 float b = dot(linedirection, lineorigin); 401 float c = dot(lineorigin, lineorigin) - 1; 402 403 float dist = 1e15; 404 float determinant = b * b - a * c; 405 if (determinant >= 0) { 406 dist = (sqrt(determinant) - b) / a; 407 } 408 409 return dist; 410 } 411 412 float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection) 413 { 414 /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ */ 415 vec3 firstplane = (vec3(1.0) - lineorigin) / linedirection; 416 vec3 secondplane = (vec3(-1.0) - lineorigin) / linedirection; 417 vec3 furthestplane = max(firstplane, secondplane); 418 419 return min_v3(furthestplane); 420 } 421 422 /* Return texture coordinates to sample Surface LUT */ 423 vec2 lut_coords(float cosTheta, float roughness) 424 { 425 float theta = acos(cosTheta); 426 vec2 coords = vec2(roughness, theta / M_PI_2); 427 428 /* scale and bias coordinates, for correct filtered lookup */ 429 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 430 } 431 432 vec2 lut_coords_ltc(float cosTheta, float roughness) 433 { 434 vec2 coords = vec2(roughness, sqrt(1.0 - cosTheta)); 435 436 /* scale and bias coordinates, for correct filtered lookup */ 437 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 438 } 439 440 /* -- Tangent Space conversion -- */ 441 vec3 tangent_to_world(vec3 vector, vec3 N, vec3 T, vec3 B) 442 { 443 return T * vector.x + B * vector.y + N * vector.z; 444 } 445 446 vec3 world_to_tangent(vec3 vector, vec3 N, vec3 T, vec3 B) 447 { 448 return vec3(dot(T, vector), dot(B, vector), dot(N, vector)); 449 } 450 451 void make_orthonormal_basis(vec3 N, out vec3 T, out vec3 B) 452 { 453 vec3 UpVector = abs(N.z) < 0.99999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 454 T = normalize(cross(UpVector, N)); 455 B = cross(N, T); 456 } 457 458 /* ---- Opengl Depth conversion ---- */ 459 460 float linear_depth(bool is_persp, float z, float zf, float zn) 461 { 462 if (is_persp) { 463 return (zn * zf) / (z * (zn - zf) + zf); 464 } 465 else { 466 return (z * 2.0 - 1.0) * zf; 467 } 468 } 469 470 float buffer_depth(bool is_persp, float z, float zf, float zn) 471 { 472 if (is_persp) { 473 return (zf * (zn - z)) / (z * (zn - zf)); 474 } 475 else { 476 return (z / (zf * 2.0)) + 0.5; 477 } 478 } 479 480 float get_view_z_from_depth(float depth) 481 { 482 if (ProjectionMatrix[3][3] == 0.0) { 483 float d = 2.0 * depth - 1.0; 484 return -ProjectionMatrix[3][2] / (d + ProjectionMatrix[2][2]); 485 } 486 else { 487 return viewVecs[0].z + depth * viewVecs[1].z; 488 } 489 } 490 491 float get_depth_from_view_z(float z) 492 { 493 if (ProjectionMatrix[3][3] == 0.0) { 494 float d = (-ProjectionMatrix[3][2] / z) - ProjectionMatrix[2][2]; 495 return d * 0.5 + 0.5; 496 } 497 else { 498 return (z - viewVecs[0].z) / viewVecs[1].z; 499 } 500 } 501 502 vec2 get_uvs_from_view(vec3 view) 503 { 504 vec3 ndc = project_point(ProjectionMatrix, view); 505 return ndc.xy * 0.5 + 0.5; 506 } 507 508 vec3 get_view_space_from_depth(vec2 uvcoords, float depth) 509 { 510 if (ProjectionMatrix[3][3] == 0.0) { 511 return vec3(viewVecs[0].xy + uvcoords * viewVecs[1].xy, 1.0) * get_view_z_from_depth(depth); 512 } 513 else { 514 return viewVecs[0].xyz + vec3(uvcoords, depth) * viewVecs[1].xyz; 515 } 516 } 517 518 vec3 get_world_space_from_depth(vec2 uvcoords, float depth) 519 { 520 return (ViewMatrixInverse * vec4(get_view_space_from_depth(uvcoords, depth), 1.0)).xyz; 521 } 522 523 vec3 get_specular_reflection_dominant_dir(vec3 N, vec3 V, float roughness) 524 { 525 vec3 R = -reflect(V, N); 526 float smoothness = 1.0 - roughness; 527 float fac = smoothness * (sqrt(smoothness) + roughness); 528 return normalize(mix(N, R, fac)); 529 } 530 531 float specular_occlusion(float NV, float AO, float roughness) 532 { 533 return saturate(pow(NV + AO, roughness) - 1.0 + AO); 534 } 535 536 /* --- Refraction utils --- */ 537 538 float ior_from_f0(float f0) 539 { 540 float f = sqrt(f0); 541 return (-f - 1.0) / (f - 1.0); 542 } 543 544 float f0_from_ior(float eta) 545 { 546 float A = (eta - 1.0) / (eta + 1.0); 547 return A * A; 548 } 549 550 vec3 get_specular_refraction_dominant_dir(vec3 N, vec3 V, float roughness, float ior) 551 { 552 /* TODO: This a bad approximation. Better approximation should fit 553 * the refracted vector and roughness into the best prefiltered reflection 554 * lobe. */ 555 /* Correct the IOR for ior < 1.0 to not see the abrupt delimitation or the TIR */ 556 ior = (ior < 1.0) ? mix(ior, 1.0, roughness) : ior; 557 float eta = 1.0 / ior; 558 559 float NV = dot(N, -V); 560 561 /* Custom Refraction. */ 562 float k = 1.0 - eta * eta * (1.0 - NV * NV); 563 k = max(0.0, k); /* Only this changes. */ 564 vec3 R = eta * -V - (eta * NV + sqrt(k)) * N; 565 566 return R; 567 } 568 569 float get_btdf_lut(sampler2DArray btdf_lut_tex, float NV, float roughness, float ior) 570 { 571 const vec3 lut_scale_bias_texel_size = vec3((LUT_SIZE - 1.0), 0.5, 1.5) / LUT_SIZE; 572 573 vec3 coords; 574 /* Try to compensate for the low resolution and interpolation error. */ 575 coords.x = (ior > 1.0) ? (0.9 + lut_scale_bias_texel_size.z) + 576 (0.1 - lut_scale_bias_texel_size.z) * f0_from_ior(ior) : 577 (0.9 + lut_scale_bias_texel_size.z) * ior * ior; 578 coords.y = 1.0 - saturate(NV); 579 coords.xy *= lut_scale_bias_texel_size.x; 580 coords.xy += lut_scale_bias_texel_size.y; 581 582 const float lut_lvl_ofs = 4.0; /* First texture lvl of roughness. */ 583 const float lut_lvl_scale = 16.0; /* How many lvl of roughness in the lut. */ 584 585 float mip = roughness * lut_lvl_scale; 586 float mip_floor = floor(mip); 587 588 coords.z = lut_lvl_ofs + mip_floor + 1.0; 589 float btdf_high = textureLod(btdf_lut_tex, coords, 0.0).r; 590 591 coords.z -= 1.0; 592 float btdf_low = textureLod(btdf_lut_tex, coords, 0.0).r; 593 594 float btdf = (ior == 1.0) ? 1.0 : mix(btdf_low, btdf_high, mip - coords.z); 595 596 return btdf; 597 } 598 599 /* ---- Encode / Decode Normal buffer data ---- */ 600 /* From http://aras-p.info/texts/CompactNormalStorage.html 601 * Using Method #4: Spheremap Transform */ 602 vec2 normal_encode(vec3 n, vec3 view) 603 { 604 float p = sqrt(n.z * 8.0 + 8.0); 605 return n.xy / p + 0.5; 606 } 607 608 vec3 normal_decode(vec2 enc, vec3 view) 609 { 610 vec2 fenc = enc * 4.0 - 2.0; 611 float f = dot(fenc, fenc); 612 float g = sqrt(1.0 - f / 4.0); 613 vec3 n; 614 n.xy = fenc * g; 615 n.z = 1 - f / 2; 616 return n; 617 } 618 619 /* ---- RGBM (shared multiplier) encoding ---- */ 620 /* From http://iwasbeingirony.blogspot.fr/2010/06/difference-between-rgbm-and-rgbd.html */ 621 622 /* Higher RGBM_MAX_RANGE gives imprecision issues in low intensity. */ 623 #define RGBM_MAX_RANGE 512.0 624 625 vec4 rgbm_encode(vec3 rgb) 626 { 627 float maxRGB = max_v3(rgb); 628 float M = maxRGB / RGBM_MAX_RANGE; 629 M = ceil(M * 255.0) / 255.0; 630 return vec4(rgb / (M * RGBM_MAX_RANGE), M); 631 } 632 633 vec3 rgbm_decode(vec4 data) 634 { 635 return data.rgb * (data.a * RGBM_MAX_RANGE); 636 } 637 638 /* ---- RGBE (shared exponent) encoding ---- */ 639 vec4 rgbe_encode(vec3 rgb) 640 { 641 float maxRGB = max_v3(rgb); 642 float fexp = ceil(log2(maxRGB)); 643 return vec4(rgb / exp2(fexp), (fexp + 128.0) / 255.0); 644 } 645 646 vec3 rgbe_decode(vec4 data) 647 { 648 float fexp = data.a * 255.0 - 128.0; 649 return data.rgb * exp2(fexp); 650 } 651 652 #if 1 653 # define irradiance_encode rgbe_encode 654 # define irradiance_decode rgbe_decode 655 #else /* No ecoding (when using floating point format) */ 656 # define irradiance_encode(X) (X).rgbb 657 # define irradiance_decode(X) (X).rgb 658 #endif 659 660 /* Irradiance Visibility Encoding */ 661 #if 1 662 vec4 visibility_encode(vec2 accum, float range) 663 { 664 accum /= range; 665 666 vec4 data; 667 data.x = fract(accum.x); 668 data.y = floor(accum.x) / 255.0; 669 data.z = fract(accum.y); 670 data.w = floor(accum.y) / 255.0; 671 672 return data; 673 } 674 675 vec2 visibility_decode(vec4 data, float range) 676 { 677 return (data.xz + data.yw * 255.0) * range; 678 } 679 #else /* No ecoding (when using floating point format) */ 680 vec4 visibility_encode(vec2 accum, float range) 681 { 682 return accum.xyxy; 683 } 684 685 vec2 visibility_decode(vec4 data, float range) 686 { 687 return data.xy; 688 } 689 #endif 690 691 /* Fresnel monochromatic, perfect mirror */ 692 float F_eta(float eta, float cos_theta) 693 { 694 /* compute fresnel reflectance without explicitly computing 695 * the refracted direction */ 696 float c = abs(cos_theta); 697 float g = eta * eta - 1.0 + c * c; 698 float result; 699 700 if (g > 0.0) { 701 g = sqrt(g); 702 vec2 g_c = vec2(g) + vec2(c, -c); 703 float A = g_c.y / g_c.x; 704 A *= A; 705 g_c *= c; 706 float B = (g_c.y - 1.0) / (g_c.x + 1.0); 707 B *= B; 708 result = 0.5 * A * (1.0 + B); 709 } 710 else { 711 result = 1.0; /* TIR (no refracted component) */ 712 } 713 714 return result; 715 } 716 717 /* Fresnel color blend base on fresnel factor */ 718 vec3 F_color_blend(float eta, float fresnel, vec3 f0_color) 719 { 720 float f0 = F_eta(eta, 1.0); 721 float fac = saturate((fresnel - f0) / max(1e-8, 1.0 - f0)); 722 return mix(f0_color, vec3(1.0), fac); 723 } 724 725 /* Fresnel */ 726 vec3 F_schlick(vec3 f0, float cos_theta) 727 { 728 float fac = 1.0 - cos_theta; 729 float fac2 = fac * fac; 730 fac = fac2 * fac2 * fac; 731 732 /* Unreal specular matching : if specular color is below 2% intensity, 733 * (using green channel for intensity) treat as shadowning */ 734 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * fac + (1.0 - fac) * f0; 735 } 736 737 /* Fresnel approximation for LTC area lights (not MRP) */ 738 vec3 F_area(vec3 f0, vec2 lut) 739 { 740 /* Unreal specular matching : if specular color is below 2% intensity, 741 * treat as shadowning */ 742 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 743 } 744 745 /* Fresnel approximation for IBL */ 746 vec3 F_ibl(vec3 f0, vec2 lut) 747 { 748 /* Unreal specular matching : if specular color is below 2% intensity, 749 * treat as shadowning */ 750 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 751 } 752 753 /* GGX */ 754 float D_ggx_opti(float NH, float a2) 755 { 756 float tmp = (NH * a2 - NH) * NH + 1.0; 757 return M_PI * tmp * tmp; /* Doing RCP and mul a2 at the end */ 758 } 759 760 float G1_Smith_GGX(float NX, float a2) 761 { 762 /* Using Brian Karis approach and refactoring by NX/NX 763 * this way the (2*NL)*(2*NV) in G = G1(V) * G1(L) gets canceled by the brdf denominator 4*NL*NV 764 * Rcp is done on the whole G later 765 * Note that this is not convenient for the transmission formula */ 766 return NX + sqrt(NX * (NX - NX * a2) + a2); 767 /* return 2 / (1 + sqrt(1 + a2 * (1 - NX*NX) / (NX*NX) ) ); /* Reference function */ 768 } 769 770 float bsdf_ggx(vec3 N, vec3 L, vec3 V, float roughness) 771 { 772 float a = roughness; 773 float a2 = a * a; 774 775 vec3 H = normalize(L + V); 776 float NH = max(dot(N, H), 1e-8); 777 float NL = max(dot(N, L), 1e-8); 778 float NV = max(dot(N, V), 1e-8); 779 780 float G = G1_Smith_GGX(NV, a2) * G1_Smith_GGX(NL, a2); /* Doing RCP at the end */ 781 float D = D_ggx_opti(NH, a2); 782 783 /* Denominator is canceled by G1_Smith */ 784 /* bsdf = D * G / (4.0 * NL * NV); /* Reference function */ 785 return NL * a2 / (D * G); /* NL to Fit cycles Equation : line. 345 in bsdf_microfacet.h */ 786 } 787 788 void accumulate_light(vec3 light, float fac, inout vec4 accum) 789 { 790 accum += vec4(light, 1.0) * min(fac, (1.0 - accum.a)); 791 } 792 793 /* ----------- Cone Aperture Approximation --------- */ 794 795 /* Return a fitted cone angle given the input roughness */ 796 float cone_cosine(float r) 797 { 798 /* Using phong gloss 799 * roughness = sqrt(2/(gloss+2)) */ 800 float gloss = -2 + 2 / (r * r); 801 /* Drobot 2014 in GPUPro5 */ 802 // return cos(2.0 * sqrt(2.0 / (gloss + 2))); 803 /* Uludag 2014 in GPUPro5 */ 804 // return pow(0.244, 1 / (gloss + 1)); 805 /* Jimenez 2016 in Practical Realtime Strategies for Accurate Indirect Occlusion*/ 806 return exp2(-3.32193 * r * r); 807 } 808 809 /* --------- Closure ---------- */ 810 #ifdef VOLUMETRICS 811 812 struct Closure { 813 vec3 absorption; 814 vec3 scatter; 815 vec3 emission; 816 float anisotropy; 817 }; 818 819 # define CLOSURE_DEFAULT Closure(vec3(0.0), vec3(0.0), vec3(0.0), 0.0) 820 821 Closure closure_mix(Closure cl1, Closure cl2, float fac) 822 { 823 Closure cl; 824 cl.absorption = mix(cl1.absorption, cl2.absorption, fac); 825 cl.scatter = mix(cl1.scatter, cl2.scatter, fac); 826 cl.emission = mix(cl1.emission, cl2.emission, fac); 827 cl.anisotropy = mix(cl1.anisotropy, cl2.anisotropy, fac); 828 return cl; 829 } 830 831 Closure closure_add(Closure cl1, Closure cl2) 832 { 833 Closure cl; 834 cl.absorption = cl1.absorption + cl2.absorption; 835 cl.scatter = cl1.scatter + cl2.scatter; 836 cl.emission = cl1.emission + cl2.emission; 837 cl.anisotropy = (cl1.anisotropy + cl2.anisotropy) / 2.0; /* Average phase (no multi lobe) */ 838 return cl; 839 } 840 841 Closure closure_emission(vec3 rgb) 842 { 843 Closure cl = CLOSURE_DEFAULT; 844 cl.emission = rgb; 845 return cl; 846 } 847 848 #else /* VOLUMETRICS */ 849 850 struct Closure { 851 vec3 radiance; 852 float opacity; 853 # ifdef USE_SSS 854 vec4 sss_data; 855 # ifdef USE_SSS_ALBEDO 856 vec3 sss_albedo; 857 # endif 858 # endif 859 vec4 ssr_data; 860 vec2 ssr_normal; 861 int ssr_id; 862 }; 863 864 /* This is hacking ssr_id to tag transparent bsdf */ 865 # define TRANSPARENT_CLOSURE_FLAG -2 866 # define REFRACT_CLOSURE_FLAG -3 867 # define NO_SSR -999 868 869 # ifdef USE_SSS 870 # ifdef USE_SSS_ALBEDO 871 # define CLOSURE_DEFAULT \ 872 Closure(vec3(0.0), 1.0, vec4(0.0), vec3(0.0), vec4(0.0), vec2(0.0), -1) 873 # else 874 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec4(0.0), vec2(0.0), -1) 875 # endif 876 # else 877 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec2(0.0), -1) 878 # endif 879 880 uniform int outputSsrId; 881 882 Closure closure_mix(Closure cl1, Closure cl2, float fac) 883 { 884 Closure cl; 885 886 if (cl1.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 887 cl1.ssr_normal = cl2.ssr_normal; 888 cl1.ssr_data = cl2.ssr_data; 889 cl1.ssr_id = cl2.ssr_id; 890 # ifdef USE_SSS 891 cl1.sss_data = cl2.sss_data; 892 # ifdef USE_SSS_ALBEDO 893 cl1.sss_albedo = cl2.sss_albedo; 894 # endif 895 # endif 896 } 897 if (cl2.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 898 cl2.ssr_normal = cl1.ssr_normal; 899 cl2.ssr_data = cl1.ssr_data; 900 cl2.ssr_id = cl1.ssr_id; 901 # ifdef USE_SSS 902 cl2.sss_data = cl1.sss_data; 903 # ifdef USE_SSS_ALBEDO 904 cl2.sss_albedo = cl1.sss_albedo; 905 # endif 906 # endif 907 } 908 909 /* When mixing SSR don't blend roughness. 910 * 911 * It makes no sense to mix them really, so we take either one of them and 912 * tone down its specularity (ssr_data.xyz) while keeping its roughness (ssr_data.w). 913 */ 914 if (cl1.ssr_id == outputSsrId) { 915 cl.ssr_data = mix(cl1.ssr_data.xyzw, vec4(vec3(0.0), cl1.ssr_data.w), fac); 916 cl.ssr_normal = cl1.ssr_normal; 917 cl.ssr_id = cl1.ssr_id; 918 } 919 else { 920 cl.ssr_data = mix(vec4(vec3(0.0), cl2.ssr_data.w), cl2.ssr_data.xyzw, fac); 921 cl.ssr_normal = cl2.ssr_normal; 922 cl.ssr_id = cl2.ssr_id; 923 } 924 925 cl.opacity = mix(cl1.opacity, cl2.opacity, fac); 926 cl.radiance = mix(cl1.radiance * cl1.opacity, cl2.radiance * cl2.opacity, fac); 927 cl.radiance /= max(1e-8, cl.opacity); 928 929 # ifdef USE_SSS 930 cl.sss_data.rgb = mix(cl1.sss_data.rgb, cl2.sss_data.rgb, fac); 931 cl.sss_data.a = (cl1.sss_data.a > 0.0) ? cl1.sss_data.a : cl2.sss_data.a; 932 # ifdef USE_SSS_ALBEDO 933 /* TODO Find a solution to this. Dither? */ 934 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 935 # endif 936 # endif 937 938 return cl; 939 } 940 941 Closure closure_add(Closure cl1, Closure cl2) 942 { 943 Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; 944 cl.radiance = cl1.radiance + cl2.radiance; 945 # ifdef USE_SSS 946 cl.sss_data = (cl1.sss_data.a > 0.0) ? cl1.sss_data : cl2.sss_data; 947 /* Add radiance that was supposed to be filtered but was rejected. */ 948 cl.radiance += (cl1.sss_data.a > 0.0) ? cl2.sss_data.rgb : cl1.sss_data.rgb; 949 # ifdef USE_SSS_ALBEDO 950 /* TODO Find a solution to this. Dither? */ 951 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 952 # endif 953 # endif 954 cl.opacity = saturate(cl1.opacity + cl2.opacity); 955 return cl; 956 } 957 958 Closure closure_emission(vec3 rgb) 959 { 960 Closure cl = CLOSURE_DEFAULT; 961 cl.radiance = rgb; 962 return cl; 963 } 964 965 # if defined(MESH_SHADER) && !defined(USE_ALPHA_HASH) && !defined(USE_ALPHA_CLIP) && \ 966 !defined(SHADOW_SHADER) && !defined(USE_MULTIPLY) 967 layout(location = 0) out vec4 fragColor; 968 layout(location = 1) out vec4 ssrNormals; 969 layout(location = 2) out vec4 ssrData; 970 # ifdef USE_SSS 971 layout(location = 3) out vec4 sssData; 972 # ifdef USE_SSS_ALBEDO 973 layout(location = 4) out vec4 sssAlbedo; 974 # endif /* USE_SSS_ALBEDO */ 975 # endif /* USE_SSS */ 976 977 Closure nodetree_exec(void); /* Prototype */ 978 979 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 980 /* Prototype because this file is included before volumetric_lib.glsl */ 981 vec4 volumetric_resolve(vec4 scene_color, vec2 frag_uvs, float frag_depth); 982 # endif 983 984 # define NODETREE_EXEC 985 void main() 986 { 987 Closure cl = nodetree_exec(); 988 # ifndef USE_ALPHA_BLEND 989 /* Prevent alpha hash material writing into alpha channel. */ 990 cl.opacity = 1.0; 991 # endif 992 993 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 994 /* XXX fragile, better use real viewport resolution */ 995 vec2 uvs = gl_FragCoord.xy / vec2(2 * textureSize(maxzBuffer, 0).xy); 996 fragColor.rgb = volumetric_resolve(vec4(cl.radiance, cl.opacity), uvs, gl_FragCoord.z).rgb; 997 fragColor.a = cl.opacity; 998 # else 999 fragColor = vec4(cl.radiance, cl.opacity); 1000 # endif 1001 1002 ssrNormals = cl.ssr_normal.xyyy; 1003 ssrData = cl.ssr_data; 1004 # ifdef USE_SSS 1005 sssData = cl.sss_data; 1006 # ifdef USE_SSS_ALBEDO 1007 sssAlbedo = cl.sss_albedo.rgbb; 1008 # endif 1009 # endif 1010 1011 /* For Probe capture */ 1012 # ifdef USE_SSS 1013 # ifdef USE_SSS_ALBEDO 1014 fragColor.rgb += cl.sss_data.rgb * cl.sss_albedo.rgb * float(!sssToggle); 1015 # else 1016 fragColor.rgb += cl.sss_data.rgb * float(!sssToggle); 1017 # endif 1018 # endif 1019 } 1020 1021 # endif /* MESH_SHADER && !SHADOW_SHADER */ 1022 1023 #endif /* VOLUMETRICS */ 1024 1025 Closure nodetree_exec(void); /* Prototype */ 1026 1027 /* TODO find a better place */ 1028 #ifdef USE_MULTIPLY 1029 1030 out vec4 fragColor; 1031 1032 # define NODETREE_EXEC 1033 void main() 1034 { 1035 Closure cl = nodetree_exec(); 1036 fragColor = vec4(mix(vec3(1.0), cl.radiance, cl.opacity), 1.0); 1037 } 1038 #endif 1039 1040 uniform sampler1D texHammersley; 1041 uniform sampler2D texJitter; 1042 uniform float sampleCount; 1043 uniform float invSampleCount; 1044 1045 vec2 jitternoise = vec2(0.0); 1046 1047 #ifndef UTIL_TEX 1048 # define UTIL_TEX 1049 uniform sampler2DArray utilTex; 1050 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 1051 #endif /* UTIL_TEX */ 1052 1053 void setup_noise(void) 1054 { 1055 jitternoise = texelfetch_noise_tex(gl_FragCoord.xy).rg; /* Global variable */ 1056 } 1057 1058 #ifdef HAMMERSLEY_SIZE 1059 vec3 hammersley_3d(float i, float invsamplenbr) 1060 { 1061 vec3 Xi; /* Theta, cos(Phi), sin(Phi) */ 1062 1063 Xi.x = i * invsamplenbr; /* i/samples */ 1064 Xi.x = fract(Xi.x + jitternoise.x); 1065 1066 int u = int(mod(i + jitternoise.y * HAMMERSLEY_SIZE, HAMMERSLEY_SIZE)); 1067 1068 Xi.yz = texelFetch(texHammersley, u, 0).rg; 1069 1070 return Xi; 1071 } 1072 1073 vec3 hammersley_3d(float i) 1074 { 1075 return hammersley_3d(i, invSampleCount); 1076 } 1077 #endif 1078 1079 /* -------------- BSDFS -------------- */ 1080 1081 float pdf_ggx_reflect(float NH, float a2) 1082 { 1083 return NH * a2 / D_ggx_opti(NH, a2); 1084 } 1085 1086 float pdf_hemisphere() 1087 { 1088 return 0.5 * M_1_PI; 1089 } 1090 1091 vec3 sample_ggx(vec3 rand, float a2) 1092 { 1093 /* Theta is the aperture angle of the cone */ 1094 float z = sqrt((1.0 - rand.x) / (1.0 + a2 * rand.x - rand.x)); /* cos theta */ 1095 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1096 float x = r * rand.y; 1097 float y = r * rand.z; 1098 1099 /* Microfacet Normal */ 1100 return vec3(x, y, z); 1101 } 1102 1103 vec3 sample_ggx(vec3 rand, float a2, vec3 N, vec3 T, vec3 B, out float NH) 1104 { 1105 vec3 Ht = sample_ggx(rand, a2); 1106 NH = Ht.z; 1107 return tangent_to_world(Ht, N, T, B); 1108 } 1109 1110 #ifdef HAMMERSLEY_SIZE 1111 vec3 sample_ggx(float nsample, float a2, vec3 N, vec3 T, vec3 B) 1112 { 1113 vec3 Xi = hammersley_3d(nsample); 1114 vec3 Ht = sample_ggx(Xi, a2); 1115 return tangent_to_world(Ht, N, T, B); 1116 } 1117 1118 vec3 sample_hemisphere(float nsample, vec3 N, vec3 T, vec3 B) 1119 { 1120 vec3 Xi = hammersley_3d(nsample); 1121 1122 float z = Xi.x; /* cos theta */ 1123 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1124 float x = r * Xi.y; 1125 float y = r * Xi.z; 1126 1127 vec3 Ht = vec3(x, y, z); 1128 1129 return tangent_to_world(Ht, N, T, B); 1130 } 1131 1132 vec3 sample_cone(float nsample, float angle, vec3 N, vec3 T, vec3 B) 1133 { 1134 vec3 Xi = hammersley_3d(nsample); 1135 1136 float z = cos(angle * Xi.x); /* cos theta */ 1137 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1138 float x = r * Xi.y; 1139 float y = r * Xi.z; 1140 1141 vec3 Ht = vec3(x, y, z); 1142 1143 return tangent_to_world(Ht, N, T, B); 1144 } 1145 #endif 1146 1147 uniform samplerCube probeHdr; 1148 uniform int probeSize; 1149 uniform float lodFactor; 1150 uniform float lodMax; 1151 uniform float intensityFac; 1152 1153 in vec3 worldPosition; 1154 1155 out vec4 FragColor; 1156 1157 #define M_4PI 12.5663706143591729 1158 1159 const mat3 CUBE_ROTATIONS[6] = mat3[]( 1160 mat3(vec3(0.0, 0.0, -1.0), vec3(0.0, -1.0, 0.0), vec3(-1.0, 0.0, 0.0)), 1161 mat3(vec3(0.0, 0.0, 1.0), vec3(0.0, -1.0, 0.0), vec3(1.0, 0.0, 0.0)), 1162 mat3(vec3(1.0, 0.0, 0.0), vec3(0.0, 0.0, 1.0), vec3(0.0, -1.0, 0.0)), 1163 mat3(vec3(1.0, 0.0, 0.0), vec3(0.0, 0.0, -1.0), vec3(0.0, 1.0, 0.0)), 1164 mat3(vec3(1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0), vec3(0.0, 0.0, -1.0)), 1165 mat3(vec3(-1.0, 0.0, 0.0), vec3(0.0, -1.0, 0.0), vec3(0.0, 0.0, 1.0))); 1166 1167 vec3 get_cubemap_vector(vec2 co, int face) 1168 { 1169 return normalize(CUBE_ROTATIONS[face] * vec3(co * 2.0 - 1.0, 1.0)); 1170 } 1171 1172 float area_element(float x, float y) 1173 { 1174 return atan(x * y, sqrt(x * x + y * y + 1)); 1175 } 1176 1177 float texel_solid_angle(vec2 co, float halfpix) 1178 { 1179 vec2 v1 = (co - vec2(halfpix)) * 2.0 - 1.0; 1180 vec2 v2 = (co + vec2(halfpix)) * 2.0 - 1.0; 1181 1182 return area_element(v1.x, v1.y) - area_element(v1.x, v2.y) - area_element(v2.x, v1.y) + 1183 area_element(v2.x, v2.y); 1184 } 1185 1186 vec3 octahedral_to_cubemap_proj(vec2 co) 1187 { 1188 co = co * 2.0 - 1.0; 1189 1190 vec2 abs_co = abs(co); 1191 vec3 v = vec3(co, 1.0 - (abs_co.x + abs_co.y)); 1192 1193 if (abs_co.x + abs_co.y > 1.0) { 1194 v.xy = (abs(co.yx) - 1.0) * -sign(co.xy); 1195 } 1196 1197 return v; 1198 } 1199 1200 void main() 1201 { 1202 #if defined(IRRADIANCE_SH_L2) 1203 float pixstep = 1.0 / probeSize; 1204 float halfpix = pixstep / 2.0; 1205 1206 /* Downside: leaks negative values, very bandwidth consuming */ 1207 int comp = int(gl_FragCoord.x) % 3 + (int(gl_FragCoord.y) % 3) * 3; 1208 1209 float weight_accum = 0.0; 1210 vec3 sh = vec3(0.0); 1211 1212 for (int face = 0; face < 6; ++face) { 1213 for (float x = halfpix; x < 1.0; x += pixstep) { 1214 for (float y = halfpix; y < 1.0; y += pixstep) { 1215 float weight, coef; 1216 vec2 facecoord = vec2(x, y); 1217 vec3 cubevec = get_cubemap_vector(facecoord, face); 1218 1219 if (comp == 0) { 1220 coef = 0.282095; 1221 } 1222 else if (comp == 1) { 1223 coef = -0.488603 * cubevec.z * 2.0 / 3.0; 1224 } 1225 else if (comp == 2) { 1226 coef = 0.488603 * cubevec.y * 2.0 / 3.0; 1227 } 1228 else if (comp == 3) { 1229 coef = -0.488603 * cubevec.x * 2.0 / 3.0; 1230 } 1231 else if (comp == 4) { 1232 coef = 1.092548 * cubevec.x * cubevec.z * 1.0 / 4.0; 1233 } 1234 else if (comp == 5) { 1235 coef = -1.092548 * cubevec.z * cubevec.y * 1.0 / 4.0; 1236 } 1237 else if (comp == 6) { 1238 coef = 0.315392 * (3.0 * cubevec.y * cubevec.y - 1.0) * 1.0 / 4.0; 1239 } 1240 else if (comp == 7) { 1241 coef = 1.092548 * cubevec.x * cubevec.y * 1.0 / 4.0; 1242 } 1243 else { /* (comp == 8) */ 1244 coef = 0.546274 * (cubevec.x * cubevec.x - cubevec.z * cubevec.z) * 1.0 / 4.0; 1245 } 1246 1247 weight = texel_solid_angle(facecoord, halfpix); 1248 1249 vec4 sample = textureLod(probeHdr, cubevec, lodMax); 1250 sh += sample.rgb * coef * weight; 1251 weight_accum += weight; 1252 } 1253 } 1254 } 1255 sh *= M_4PI / weight_accum; 1256 1257 FragColor = vec4(sh, 1.0); 1258 #else 1259 # if defined(IRRADIANCE_CUBEMAP) 1260 /* Downside: Need lots of memory for storage, distortion due to octahedral mapping */ 1261 const vec2 map_size = vec2(16.0); 1262 const vec2 texelSize = 1.0 / map_size; 1263 vec2 uvs = mod(gl_FragCoord.xy, map_size) * texelSize; 1264 const float paddingSize = 1.0; 1265 1266 /* Add a N pixel border to ensure filtering is correct 1267 * for N mipmap levels. */ 1268 uvs = (uvs - texelSize * paddingSize) / (1.0 - 2.0 * texelSize * paddingSize); 1269 1270 /* edge mirroring : only mirror if directly adjacent 1271 * (not diagonally adjacent) */ 1272 vec2 m = abs(uvs - 0.5) + 0.5; 1273 vec2 f = floor(m); 1274 if (f.x - f.y != 0.0) { 1275 uvs = 1.0 - uvs; 1276 } 1277 1278 /* clamp to [0-1] */ 1279 uvs = fract(uvs); 1280 1281 /* get cubemap vector */ 1282 vec3 cubevec = octahedral_to_cubemap_proj(uvs); 1283 1284 # elif defined(IRRADIANCE_HL2) 1285 /* Downside: very very low resolution (6 texels), bleed lighting because of interpolation */ 1286 int x = int(gl_FragCoord.x) % 3; 1287 int y = int(gl_FragCoord.y) % 2; 1288 1289 vec3 cubevec = vec3(1.0, 0.0, 0.0); 1290 1291 if (x == 1) { 1292 cubevec = cubevec.yxy; 1293 } 1294 else if (x == 2) { 1295 cubevec = cubevec.yyx; 1296 } 1297 1298 if (y == 1) { 1299 cubevec = -cubevec; 1300 } 1301 # endif 1302 1303 vec3 N, T, B, V; 1304 1305 N = normalize(cubevec); 1306 1307 make_orthonormal_basis(N, T, B); /* Generate tangent space */ 1308 1309 /* Integrating Envmap */ 1310 float weight = 0.0; 1311 vec3 out_radiance = vec3(0.0); 1312 for (float i = 0; i < sampleCount; i++) { 1313 vec3 L = sample_hemisphere(i, N, T, B); /* Microfacet normal */ 1314 float NL = dot(N, L); 1315 1316 if (NL > 0.0) { 1317 /* Coarse Approximation of the mapping distortion 1318 * Unit Sphere -> Cubemap Face */ 1319 const float dist = 4.0 * M_PI / 6.0; 1320 float pdf = pdf_hemisphere(); 1321 /* http://http.developer.nvidia.com/GPUGems3/gpugems3_ch20.html : Equation 13 */ 1322 float lod = clamp(lodFactor - 0.5 * log2(pdf * dist), 0.0, lodMax); 1323 1324 out_radiance += textureLod(probeHdr, L, lod).rgb * NL; 1325 weight += NL; 1326 } 1327 } 1328 1329 FragColor = irradiance_encode(intensityFac * out_radiance / weight); 1330 #endif 1331 } 0(965) : error C0105: Syntax error in #if 0(965) : error C0105: Syntax error in #if 0(966) : error C0000: syntax error, unexpected '!' at token "!" 0(1200) : error C1013: function "main" is already defined at 0(985) GPUShader: compile error: ===== shader string 1 ==== 1 #version 330 ===== shader string 2 ==== 2 #define GPU_FRAGMENT_SHADER ===== shader string 3 ==== 3 #extension GL_ARB_texture_gather: enable 4 #define GPU_ARB_texture_gather 5 #extension GL_ARB_texture_query_lod: enable ===== shader string 4 ==== 6 #define GPU_NVIDIA 7 #define OS_WIN ===== shader string 5 ==== 8 #define HAMMERSLEY_SIZE 1024 9 #define IRRADIANCE_HL2 10 #define NOISE_SIZE 64 ===== shader string 6 ==== 11 /* keep in sync with DRWManager.view_data */ 12 layout(std140) uniform viewBlock 13 { 14 /* Same order as DRWViewportMatrixType */ 15 mat4 ViewProjectionMatrix; 16 mat4 ViewProjectionMatrixInverse; 17 mat4 ViewMatrix; 18 mat4 ViewMatrixInverse; 19 mat4 ProjectionMatrix; 20 mat4 ProjectionMatrixInverse; 21 22 vec4 CameraTexCoFactors; 23 24 vec4 clipPlanes[2]; 25 }; 26 27 layout(std140) uniform common_block 28 { 29 mat4 pastViewProjectionMatrix; 30 vec4 viewVecs[2]; 31 vec2 mipRatio[10]; /* To correct mip level texel mis-alignement */ 32 /* Ambient Occlusion */ 33 vec4 aoParameters[2]; 34 /* Volumetric */ 35 ivec4 volTexSize; 36 vec4 volDepthParameters; /* Parameters to the volume Z equation */ 37 vec4 volInvTexSize; 38 vec4 volJitter; 39 vec4 volCoordScale; /* To convert volume uvs to screen uvs */ 40 float volHistoryAlpha; 41 float volLightClamp; 42 float volShadowSteps; 43 bool volUseLights; 44 /* Screen Space Reflections */ 45 vec4 ssrParameters; 46 float ssrBorderFac; 47 float ssrMaxRoughness; 48 float ssrFireflyFac; 49 float ssrBrdfBias; 50 bool ssrToggle; 51 /* SubSurface Scattering */ 52 float sssJitterThreshold; 53 bool sssToggle; 54 /* Specular */ 55 bool specToggle; 56 /* Lights */ 57 int laNumLight; 58 /* Probes */ 59 int prbNumPlanar; 60 int prbNumRenderCube; 61 int prbNumRenderGrid; 62 int prbIrradianceVisSize; 63 float prbIrradianceSmooth; 64 float prbLodCubeMax; 65 float prbLodPlanarMax; 66 /* Misc*/ 67 int hizMipOffset; 68 int rayType; 69 float rayDepth; 70 }; 71 72 /* rayType (keep in sync with ray_type) */ 73 #define EEVEE_RAY_CAMERA 0 74 #define EEVEE_RAY_SHADOW 1 75 #define EEVEE_RAY_DIFFUSE 2 76 #define EEVEE_RAY_GLOSSY 3 77 78 /* aoParameters */ 79 #define aoDistance aoParameters[0].x 80 #define aoSamples aoParameters[0].y /* UNUSED */ 81 #define aoFactor aoParameters[0].z 82 #define aoInvSamples aoParameters[0].w /* UNUSED */ 83 84 #define aoOffset aoParameters[1].x /* UNUSED */ 85 #define aoBounceFac aoParameters[1].y 86 #define aoQuality aoParameters[1].z 87 #define aoSettings aoParameters[1].w 88 89 /* ssrParameters */ 90 #define ssrQuality ssrParameters.x 91 #define ssrThickness ssrParameters.y 92 #define ssrPixelSize ssrParameters.zw 93 94 #define M_PI 3.14159265358979323846 /* pi */ 95 #define M_2PI 6.28318530717958647692 /* 2*pi */ 96 #define M_PI_2 1.57079632679489661923 /* pi/2 */ 97 #define M_1_PI 0.318309886183790671538 /* 1/pi */ 98 #define M_1_2PI 0.159154943091895335768 /* 1/(2*pi) */ 99 #define M_1_PI2 0.101321183642337771443 /* 1/(pi^2) */ 100 101 #define LUT_SIZE 64 102 103 /* Buffers */ 104 uniform sampler2D colorBuffer; 105 uniform sampler2D depthBuffer; 106 uniform sampler2D maxzBuffer; 107 uniform sampler2D minzBuffer; 108 uniform sampler2DArray planarDepth; 109 110 #define cameraForward normalize(ViewMatrixInverse[2].xyz) 111 #define cameraPos ViewMatrixInverse[3].xyz 112 #define cameraVec \ 113 ((ProjectionMatrix[3][3] == 0.0) ? normalize(cameraPos - worldPosition) : cameraForward) 114 #define viewCameraVec \ 115 ((ProjectionMatrix[3][3] == 0.0) ? normalize(-viewPosition) : vec3(0.0, 0.0, 1.0)) 116 117 /* ------- Structures -------- */ 118 119 /* ------ Lights ----- */ 120 struct LightData { 121 vec4 position_influence; /* w : InfluenceRadius (inversed and squared) */ 122 vec4 color_spec; /* w : Spec Intensity */ 123 vec4 spotdata_radius_shadow; /* x : spot size, y : spot blend, z : radius, w: shadow id */ 124 vec4 rightvec_sizex; /* xyz: Normalized up vector, w: area size X or spot scale X */ 125 vec4 upvec_sizey; /* xyz: Normalized right vector, w: area size Y or spot scale Y */ 126 vec4 forwardvec_type; /* xyz: Normalized forward vector, w: Light Type */ 127 }; 128 129 /* convenience aliases */ 130 #define l_color color_spec.rgb 131 #define l_spec color_spec.a 132 #define l_position position_influence.xyz 133 #define l_influence position_influence.w 134 #define l_sizex rightvec_sizex.w 135 #define l_sizey upvec_sizey.w 136 #define l_right rightvec_sizex.xyz 137 #define l_up upvec_sizey.xyz 138 #define l_forward forwardvec_type.xyz 139 #define l_type forwardvec_type.w 140 #define l_spot_size spotdata_radius_shadow.x 141 #define l_spot_blend spotdata_radius_shadow.y 142 #define l_radius spotdata_radius_shadow.z 143 #define l_shadowid spotdata_radius_shadow.w 144 145 /* ------ Shadows ----- */ 146 #ifndef MAX_CASCADE_NUM 147 # define MAX_CASCADE_NUM 4 148 #endif 149 150 struct ShadowData { 151 vec4 near_far_bias_exp; 152 vec4 shadow_data_start_end; 153 vec4 contact_shadow_data; 154 }; 155 156 struct ShadowCubeData { 157 vec4 position; 158 }; 159 160 struct ShadowCascadeData { 161 mat4 shadowmat[MAX_CASCADE_NUM]; 162 vec4 split_start_distances; 163 vec4 split_end_distances; 164 }; 165 166 /* convenience aliases */ 167 #define sh_near near_far_bias_exp.x 168 #define sh_far near_far_bias_exp.y 169 #define sh_bias near_far_bias_exp.z 170 #define sh_exp near_far_bias_exp.w 171 #define sh_bleed near_far_bias_exp.w 172 #define sh_tex_start shadow_data_start_end.x 173 #define sh_data_start shadow_data_start_end.y 174 #define sh_multi_nbr shadow_data_start_end.z 175 #define sh_blur shadow_data_start_end.w 176 #define sh_contact_dist contact_shadow_data.x 177 #define sh_contact_offset contact_shadow_data.y 178 #define sh_contact_spread contact_shadow_data.z 179 #define sh_contact_thickness contact_shadow_data.w 180 181 /* ------- Convenience functions --------- */ 182 183 vec3 mul(mat3 m, vec3 v) 184 { 185 return m * v; 186 } 187 mat3 mul(mat3 m1, mat3 m2) 188 { 189 return m1 * m2; 190 } 191 vec3 transform_direction(mat4 m, vec3 v) 192 { 193 return mat3(m) * v; 194 } 195 vec3 transform_point(mat4 m, vec3 v) 196 { 197 return (m * vec4(v, 1.0)).xyz; 198 } 199 vec3 project_point(mat4 m, vec3 v) 200 { 201 vec4 tmp = m * vec4(v, 1.0); 202 return tmp.xyz / tmp.w; 203 } 204 205 #define min3(a, b, c) min(a, min(b, c)) 206 #define min4(a, b, c, d) min(a, min3(b, c, d)) 207 #define min5(a, b, c, d, e) min(a, min4(b, c, d, e)) 208 #define min6(a, b, c, d, e, f) min(a, min5(b, c, d, e, f)) 209 #define min7(a, b, c, d, e, f, g) min(a, min6(b, c, d, e, f, g)) 210 #define min8(a, b, c, d, e, f, g, h) min(a, min7(b, c, d, e, f, g, h)) 211 #define min9(a, b, c, d, e, f, g, h, i) min(a, min8(b, c, d, e, f, g, h, i)) 212 213 #define max3(a, b, c) max(a, max(b, c)) 214 #define max4(a, b, c, d) max(a, max3(b, c, d)) 215 #define max5(a, b, c, d, e) max(a, max4(b, c, d, e)) 216 #define max6(a, b, c, d, e, f) max(a, max5(b, c, d, e, f)) 217 #define max7(a, b, c, d, e, f, g) max(a, max6(b, c, d, e, f, g)) 218 #define max8(a, b, c, d, e, f, g, h) max(a, max7(b, c, d, e, f, g, h)) 219 #define max9(a, b, c, d, e, f, g, h, i) max(a, max8(b, c, d, e, f, g, h, i)) 220 221 #define avg3(a, b, c) (a + b + c) * (1.0 / 3.0) 222 #define avg4(a, b, c, d) (a + b + c + d) * (1.0 / 4.0) 223 #define avg5(a, b, c, d, e) (a + b + c + d + e) * (1.0 / 5.0) 224 #define avg6(a, b, c, d, e, f) (a + b + c + d + e + f) * (1.0 / 6.0) 225 #define avg7(a, b, c, d, e, f, g) (a + b + c + d + e + f + g) * (1.0 / 7.0) 226 #define avg8(a, b, c, d, e, f, g, h) (a + b + c + d + e + f + g + h) * (1.0 / 8.0) 227 #define avg9(a, b, c, d, e, f, g, h, i) (a + b + c + d + e + f + g + h + i) * (1.0 / 9.0) 228 229 float min_v2(vec2 v) 230 { 231 return min(v.x, v.y); 232 } 233 float min_v3(vec3 v) 234 { 235 return min(v.x, min(v.y, v.z)); 236 } 237 float max_v2(vec2 v) 238 { 239 return max(v.x, v.y); 240 } 241 float max_v3(vec3 v) 242 { 243 return max(v.x, max(v.y, v.z)); 244 } 245 246 float sum(vec2 v) 247 { 248 return dot(vec2(1.0), v); 249 } 250 float sum(vec3 v) 251 { 252 return dot(vec3(1.0), v); 253 } 254 float sum(vec4 v) 255 { 256 return dot(vec4(1.0), v); 257 } 258 259 float saturate(float a) 260 { 261 return clamp(a, 0.0, 1.0); 262 } 263 vec2 saturate(vec2 a) 264 { 265 return clamp(a, 0.0, 1.0); 266 } 267 vec3 saturate(vec3 a) 268 { 269 return clamp(a, 0.0, 1.0); 270 } 271 vec4 saturate(vec4 a) 272 { 273 return clamp(a, 0.0, 1.0); 274 } 275 276 float distance_squared(vec2 a, vec2 b) 277 { 278 a -= b; 279 return dot(a, a); 280 } 281 float distance_squared(vec3 a, vec3 b) 282 { 283 a -= b; 284 return dot(a, a); 285 } 286 float len_squared(vec3 a) 287 { 288 return dot(a, a); 289 } 290 291 float inverse_distance(vec3 V) 292 { 293 return max(1 / length(V), 1e-8); 294 } 295 296 vec2 mip_ratio_interp(float mip) 297 { 298 float low_mip = floor(mip); 299 return mix(mipRatio[int(low_mip)], mipRatio[int(low_mip + 1.0)], mip - low_mip); 300 } 301 302 /* ------- RNG ------- */ 303 304 float wang_hash_noise(uint s) 305 { 306 s = (s ^ 61u) ^ (s >> 16u); 307 s *= 9u; 308 s = s ^ (s >> 4u); 309 s *= 0x27d4eb2du; 310 s = s ^ (s >> 15u); 311 312 return fract(float(s) / 4294967296.0); 313 } 314 315 /* ------- Fast Math ------- */ 316 317 /* [Drobot2014a] Low Level Optimizations for GCN */ 318 float fast_sqrt(float v) 319 { 320 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 321 } 322 323 vec2 fast_sqrt(vec2 v) 324 { 325 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 326 } 327 328 /* [Eberly2014] GPGPU Programming for Games and Science */ 329 float fast_acos(float v) 330 { 331 float res = -0.156583 * abs(v) + M_PI_2; 332 res *= fast_sqrt(1.0 - abs(v)); 333 return (v >= 0) ? res : M_PI - res; 334 } 335 336 vec2 fast_acos(vec2 v) 337 { 338 vec2 res = -0.156583 * abs(v) + M_PI_2; 339 res *= fast_sqrt(1.0 - abs(v)); 340 v.x = (v.x >= 0) ? res.x : M_PI - res.x; 341 v.y = (v.y >= 0) ? res.y : M_PI - res.y; 342 return v; 343 } 344 345 float point_plane_projection_dist(vec3 lineorigin, vec3 planeorigin, vec3 planenormal) 346 { 347 return dot(planenormal, planeorigin - lineorigin); 348 } 349 350 float line_plane_intersect_dist(vec3 lineorigin, 351 vec3 linedirection, 352 vec3 planeorigin, 353 vec3 planenormal) 354 { 355 return dot(planenormal, planeorigin - lineorigin) / dot(planenormal, linedirection); 356 } 357 358 float line_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec4 plane) 359 { 360 vec3 plane_co = plane.xyz * (-plane.w / len_squared(plane.xyz)); 361 vec3 h = lineorigin - plane_co; 362 return -dot(plane.xyz, h) / dot(plane.xyz, linedirection); 363 } 364 365 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin, vec3 planenormal) 366 { 367 float dist = line_plane_intersect_dist(lineorigin, linedirection, planeorigin, planenormal); 368 return lineorigin + linedirection * dist; 369 } 370 371 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec4 plane) 372 { 373 float dist = line_plane_intersect_dist(lineorigin, linedirection, plane); 374 return lineorigin + linedirection * dist; 375 } 376 377 float line_aligned_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 378 { 379 /* aligned plane normal */ 380 vec3 L = planeorigin - lineorigin; 381 float diskdist = length(L); 382 vec3 planenormal = -normalize(L); 383 return -diskdist / dot(planenormal, linedirection); 384 } 385 386 vec3 line_aligned_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 387 { 388 float dist = line_aligned_plane_intersect_dist(lineorigin, linedirection, planeorigin); 389 if (dist < 0) { 390 /* if intersection is behind we fake the intersection to be 391 * really far and (hopefully) not inside the radius of interest */ 392 dist = 1e16; 393 } 394 return lineorigin + linedirection * dist; 395 } 396 397 float line_unit_sphere_intersect_dist(vec3 lineorigin, vec3 linedirection) 398 { 399 float a = dot(linedirection, linedirection); 400 float b = dot(linedirection, lineorigin); 401 float c = dot(lineorigin, lineorigin) - 1; 402 403 float dist = 1e15; 404 float determinant = b * b - a * c; 405 if (determinant >= 0) { 406 dist = (sqrt(determinant) - b) / a; 407 } 408 409 return dist; 410 } 411 412 float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection) 413 { 414 /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ */ 415 vec3 firstplane = (vec3(1.0) - lineorigin) / linedirection; 416 vec3 secondplane = (vec3(-1.0) - lineorigin) / linedirection; 417 vec3 furthestplane = max(firstplane, secondplane); 418 419 return min_v3(furthestplane); 420 } 421 422 /* Return texture coordinates to sample Surface LUT */ 423 vec2 lut_coords(float cosTheta, float roughness) 424 { 425 float theta = acos(cosTheta); 426 vec2 coords = vec2(roughness, theta / M_PI_2); 427 428 /* scale and bias coordinates, for correct filtered lookup */ 429 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 430 } 431 432 vec2 lut_coords_ltc(float cosTheta, float roughness) 433 { 434 vec2 coords = vec2(roughness, sqrt(1.0 - cosTheta)); 435 436 /* scale and bias coordinates, for correct filtered lookup */ 437 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 438 } 439 440 /* -- Tangent Space conversion -- */ 441 vec3 tangent_to_world(vec3 vector, vec3 N, vec3 T, vec3 B) 442 { 443 return T * vector.x + B * vector.y + N * vector.z; 444 } 445 446 vec3 world_to_tangent(vec3 vector, vec3 N, vec3 T, vec3 B) 447 { 448 return vec3(dot(T, vector), dot(B, vector), dot(N, vector)); 449 } 450 451 void make_orthonormal_basis(vec3 N, out vec3 T, out vec3 B) 452 { 453 vec3 UpVector = abs(N.z) < 0.99999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 454 T = normalize(cross(UpVector, N)); 455 B = cross(N, T); 456 } 457 458 /* ---- Opengl Depth conversion ---- */ 459 460 float linear_depth(bool is_persp, float z, float zf, float zn) 461 { 462 if (is_persp) { 463 return (zn * zf) / (z * (zn - zf) + zf); 464 } 465 else { 466 return (z * 2.0 - 1.0) * zf; 467 } 468 } 469 470 float buffer_depth(bool is_persp, float z, float zf, float zn) 471 { 472 if (is_persp) { 473 return (zf * (zn - z)) / (z * (zn - zf)); 474 } 475 else { 476 return (z / (zf * 2.0)) + 0.5; 477 } 478 } 479 480 float get_view_z_from_depth(float depth) 481 { 482 if (ProjectionMatrix[3][3] == 0.0) { 483 float d = 2.0 * depth - 1.0; 484 return -ProjectionMatrix[3][2] / (d + ProjectionMatrix[2][2]); 485 } 486 else { 487 return viewVecs[0].z + depth * viewVecs[1].z; 488 } 489 } 490 491 float get_depth_from_view_z(float z) 492 { 493 if (ProjectionMatrix[3][3] == 0.0) { 494 float d = (-ProjectionMatrix[3][2] / z) - ProjectionMatrix[2][2]; 495 return d * 0.5 + 0.5; 496 } 497 else { 498 return (z - viewVecs[0].z) / viewVecs[1].z; 499 } 500 } 501 502 vec2 get_uvs_from_view(vec3 view) 503 { 504 vec3 ndc = project_point(ProjectionMatrix, view); 505 return ndc.xy * 0.5 + 0.5; 506 } 507 508 vec3 get_view_space_from_depth(vec2 uvcoords, float depth) 509 { 510 if (ProjectionMatrix[3][3] == 0.0) { 511 return vec3(viewVecs[0].xy + uvcoords * viewVecs[1].xy, 1.0) * get_view_z_from_depth(depth); 512 } 513 else { 514 return viewVecs[0].xyz + vec3(uvcoords, depth) * viewVecs[1].xyz; 515 } 516 } 517 518 vec3 get_world_space_from_depth(vec2 uvcoords, float depth) 519 { 520 return (ViewMatrixInverse * vec4(get_view_space_from_depth(uvcoords, depth), 1.0)).xyz; 521 } 522 523 vec3 get_specular_reflection_dominant_dir(vec3 N, vec3 V, float roughness) 524 { 525 vec3 R = -reflect(V, N); 526 float smoothness = 1.0 - roughness; 527 float fac = smoothness * (sqrt(smoothness) + roughness); 528 return normalize(mix(N, R, fac)); 529 } 530 531 float specular_occlusion(float NV, float AO, float roughness) 532 { 533 return saturate(pow(NV + AO, roughness) - 1.0 + AO); 534 } 535 536 /* --- Refraction utils --- */ 537 538 float ior_from_f0(float f0) 539 { 540 float f = sqrt(f0); 541 return (-f - 1.0) / (f - 1.0); 542 } 543 544 float f0_from_ior(float eta) 545 { 546 float A = (eta - 1.0) / (eta + 1.0); 547 return A * A; 548 } 549 550 vec3 get_specular_refraction_dominant_dir(vec3 N, vec3 V, float roughness, float ior) 551 { 552 /* TODO: This a bad approximation. Better approximation should fit 553 * the refracted vector and roughness into the best prefiltered reflection 554 * lobe. */ 555 /* Correct the IOR for ior < 1.0 to not see the abrupt delimitation or the TIR */ 556 ior = (ior < 1.0) ? mix(ior, 1.0, roughness) : ior; 557 float eta = 1.0 / ior; 558 559 float NV = dot(N, -V); 560 561 /* Custom Refraction. */ 562 float k = 1.0 - eta * eta * (1.0 - NV * NV); 563 k = max(0.0, k); /* Only this changes. */ 564 vec3 R = eta * -V - (eta * NV + sqrt(k)) * N; 565 566 return R; 567 } 568 569 float get_btdf_lut(sampler2DArray btdf_lut_tex, float NV, float roughness, float ior) 570 { 571 const vec3 lut_scale_bias_texel_size = vec3((LUT_SIZE - 1.0), 0.5, 1.5) / LUT_SIZE; 572 573 vec3 coords; 574 /* Try to compensate for the low resolution and interpolation error. */ 575 coords.x = (ior > 1.0) ? (0.9 + lut_scale_bias_texel_size.z) + 576 (0.1 - lut_scale_bias_texel_size.z) * f0_from_ior(ior) : 577 (0.9 + lut_scale_bias_texel_size.z) * ior * ior; 578 coords.y = 1.0 - saturate(NV); 579 coords.xy *= lut_scale_bias_texel_size.x; 580 coords.xy += lut_scale_bias_texel_size.y; 581 582 const float lut_lvl_ofs = 4.0; /* First texture lvl of roughness. */ 583 const float lut_lvl_scale = 16.0; /* How many lvl of roughness in the lut. */ 584 585 float mip = roughness * lut_lvl_scale; 586 float mip_floor = floor(mip); 587 588 coords.z = lut_lvl_ofs + mip_floor + 1.0; 589 float btdf_high = textureLod(btdf_lut_tex, coords, 0.0).r; 590 591 coords.z -= 1.0; 592 float btdf_low = textureLod(btdf_lut_tex, coords, 0.0).r; 593 594 float btdf = (ior == 1.0) ? 1.0 : mix(btdf_low, btdf_high, mip - coords.z); 595 596 return btdf; 597 } 598 599 /* ---- Encode / Decode Normal buffer data ---- */ 600 /* From http://aras-p.info/texts/CompactNormalStorage.html 601 * Using Method #4: Spheremap Transform */ 602 vec2 normal_encode(vec3 n, vec3 view) 603 { 604 float p = sqrt(n.z * 8.0 + 8.0); 605 return n.xy / p + 0.5; 606 } 607 608 vec3 normal_decode(vec2 enc, vec3 view) 609 { 610 vec2 fenc = enc * 4.0 - 2.0; 611 float f = dot(fenc, fenc); 612 float g = sqrt(1.0 - f / 4.0); 613 vec3 n; 614 n.xy = fenc * g; 615 n.z = 1 - f / 2; 616 return n; 617 } 618 619 /* ---- RGBM (shared multiplier) encoding ---- */ 620 /* From http://iwasbeingirony.blogspot.fr/2010/06/difference-between-rgbm-and-rgbd.html */ 621 622 /* Higher RGBM_MAX_RANGE gives imprecision issues in low intensity. */ 623 #define RGBM_MAX_RANGE 512.0 624 625 vec4 rgbm_encode(vec3 rgb) 626 { 627 float maxRGB = max_v3(rgb); 628 float M = maxRGB / RGBM_MAX_RANGE; 629 M = ceil(M * 255.0) / 255.0; 630 return vec4(rgb / (M * RGBM_MAX_RANGE), M); 631 } 632 633 vec3 rgbm_decode(vec4 data) 634 { 635 return data.rgb * (data.a * RGBM_MAX_RANGE); 636 } 637 638 /* ---- RGBE (shared exponent) encoding ---- */ 639 vec4 rgbe_encode(vec3 rgb) 640 { 641 float maxRGB = max_v3(rgb); 642 float fexp = ceil(log2(maxRGB)); 643 return vec4(rgb / exp2(fexp), (fexp + 128.0) / 255.0); 644 } 645 646 vec3 rgbe_decode(vec4 data) 647 { 648 float fexp = data.a * 255.0 - 128.0; 649 return data.rgb * exp2(fexp); 650 } 651 652 #if 1 653 # define irradiance_encode rgbe_encode 654 # define irradiance_decode rgbe_decode 655 #else /* No ecoding (when using floating point format) */ 656 # define irradiance_encode(X) (X).rgbb 657 # define irradiance_decode(X) (X).rgb 658 #endif 659 660 /* Irradiance Visibility Encoding */ 661 #if 1 662 vec4 visibility_encode(vec2 accum, float range) 663 { 664 accum /= range; 665 666 vec4 data; 667 data.x = fract(accum.x); 668 data.y = floor(accum.x) / 255.0; 669 data.z = fract(accum.y); 670 data.w = floor(accum.y) / 255.0; 671 672 return data; 673 } 674 675 vec2 visibility_decode(vec4 data, float range) 676 { 677 return (data.xz + data.yw * 255.0) * range; 678 } 679 #else /* No ecoding (when using floating point format) */ 680 vec4 visibility_encode(vec2 accum, float range) 681 { 682 return accum.xyxy; 683 } 684 685 vec2 visibility_decode(vec4 data, float range) 686 { 687 return data.xy; 688 } 689 #endif 690 691 /* Fresnel monochromatic, perfect mirror */ 692 float F_eta(float eta, float cos_theta) 693 { 694 /* compute fresnel reflectance without explicitly computing 695 * the refracted direction */ 696 float c = abs(cos_theta); 697 float g = eta * eta - 1.0 + c * c; 698 float result; 699 700 if (g > 0.0) { 701 g = sqrt(g); 702 vec2 g_c = vec2(g) + vec2(c, -c); 703 float A = g_c.y / g_c.x; 704 A *= A; 705 g_c *= c; 706 float B = (g_c.y - 1.0) / (g_c.x + 1.0); 707 B *= B; 708 result = 0.5 * A * (1.0 + B); 709 } 710 else { 711 result = 1.0; /* TIR (no refracted component) */ 712 } 713 714 return result; 715 } 716 717 /* Fresnel color blend base on fresnel factor */ 718 vec3 F_color_blend(float eta, float fresnel, vec3 f0_color) 719 { 720 float f0 = F_eta(eta, 1.0); 721 float fac = saturate((fresnel - f0) / max(1e-8, 1.0 - f0)); 722 return mix(f0_color, vec3(1.0), fac); 723 } 724 725 /* Fresnel */ 726 vec3 F_schlick(vec3 f0, float cos_theta) 727 { 728 float fac = 1.0 - cos_theta; 729 float fac2 = fac * fac; 730 fac = fac2 * fac2 * fac; 731 732 /* Unreal specular matching : if specular color is below 2% intensity, 733 * (using green channel for intensity) treat as shadowning */ 734 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * fac + (1.0 - fac) * f0; 735 } 736 737 /* Fresnel approximation for LTC area lights (not MRP) */ 738 vec3 F_area(vec3 f0, vec2 lut) 739 { 740 /* Unreal specular matching : if specular color is below 2% intensity, 741 * treat as shadowning */ 742 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 743 } 744 745 /* Fresnel approximation for IBL */ 746 vec3 F_ibl(vec3 f0, vec2 lut) 747 { 748 /* Unreal specular matching : if specular color is below 2% intensity, 749 * treat as shadowning */ 750 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 751 } 752 753 /* GGX */ 754 float D_ggx_opti(float NH, float a2) 755 { 756 float tmp = (NH * a2 - NH) * NH + 1.0; 757 return M_PI * tmp * tmp; /* Doing RCP and mul a2 at the end */ 758 } 759 760 float G1_Smith_GGX(float NX, float a2) 761 { 762 /* Using Brian Karis approach and refactoring by NX/NX 763 * this way the (2*NL)*(2*NV) in G = G1(V) * G1(L) gets canceled by the brdf denominator 4*NL*NV 764 * Rcp is done on the whole G later 765 * Note that this is not convenient for the transmission formula */ 766 return NX + sqrt(NX * (NX - NX * a2) + a2); 767 /* return 2 / (1 + sqrt(1 + a2 * (1 - NX*NX) / (NX*NX) ) ); /* Reference function */ 768 } 769 770 float bsdf_ggx(vec3 N, vec3 L, vec3 V, float roughness) 771 { 772 float a = roughness; 773 float a2 = a * a; 774 775 vec3 H = normalize(L + V); 776 float NH = max(dot(N, H), 1e-8); 777 float NL = max(dot(N, L), 1e-8); 778 float NV = max(dot(N, V), 1e-8); 779 780 float G = G1_Smith_GGX(NV, a2) * G1_Smith_GGX(NL, a2); /* Doing RCP at the end */ 781 float D = D_ggx_opti(NH, a2); 782 783 /* Denominator is canceled by G1_Smith */ 784 /* bsdf = D * G / (4.0 * NL * NV); /* Reference function */ 785 return NL * a2 / (D * G); /* NL to Fit cycles Equation : line. 345 in bsdf_microfacet.h */ 786 } 787 788 void accumulate_light(vec3 light, float fac, inout vec4 accum) 789 { 790 accum += vec4(light, 1.0) * min(fac, (1.0 - accum.a)); 791 } 792 793 /* ----------- Cone Aperture Approximation --------- */ 794 795 /* Return a fitted cone angle given the input roughness */ 796 float cone_cosine(float r) 797 { 798 /* Using phong gloss 799 * roughness = sqrt(2/(gloss+2)) */ 800 float gloss = -2 + 2 / (r * r); 801 /* Drobot 2014 in GPUPro5 */ 802 // return cos(2.0 * sqrt(2.0 / (gloss + 2))); 803 /* Uludag 2014 in GPUPro5 */ 804 // return pow(0.244, 1 / (gloss + 1)); 805 /* Jimenez 2016 in Practical Realtime Strategies for Accurate Indirect Occlusion*/ 806 return exp2(-3.32193 * r * r); 807 } 808 809 /* --------- Closure ---------- */ 810 #ifdef VOLUMETRICS 811 812 struct Closure { 813 vec3 absorption; 814 vec3 scatter; 815 vec3 emission; 816 float anisotropy; 817 }; 818 819 # define CLOSURE_DEFAULT Closure(vec3(0.0), vec3(0.0), vec3(0.0), 0.0) 820 821 Closure closure_mix(Closure cl1, Closure cl2, float fac) 822 { 823 Closure cl; 824 cl.absorption = mix(cl1.absorption, cl2.absorption, fac); 825 cl.scatter = mix(cl1.scatter, cl2.scatter, fac); 826 cl.emission = mix(cl1.emission, cl2.emission, fac); 827 cl.anisotropy = mix(cl1.anisotropy, cl2.anisotropy, fac); 828 return cl; 829 } 830 831 Closure closure_add(Closure cl1, Closure cl2) 832 { 833 Closure cl; 834 cl.absorption = cl1.absorption + cl2.absorption; 835 cl.scatter = cl1.scatter + cl2.scatter; 836 cl.emission = cl1.emission + cl2.emission; 837 cl.anisotropy = (cl1.anisotropy + cl2.anisotropy) / 2.0; /* Average phase (no multi lobe) */ 838 return cl; 839 } 840 841 Closure closure_emission(vec3 rgb) 842 { 843 Closure cl = CLOSURE_DEFAULT; 844 cl.emission = rgb; 845 return cl; 846 } 847 848 #else /* VOLUMETRICS */ 849 850 struct Closure { 851 vec3 radiance; 852 float opacity; 853 # ifdef USE_SSS 854 vec4 sss_data; 855 # ifdef USE_SSS_ALBEDO 856 vec3 sss_albedo; 857 # endif 858 # endif 859 vec4 ssr_data; 860 vec2 ssr_normal; 861 int ssr_id; 862 }; 863 864 /* This is hacking ssr_id to tag transparent bsdf */ 865 # define TRANSPARENT_CLOSURE_FLAG -2 866 # define REFRACT_CLOSURE_FLAG -3 867 # define NO_SSR -999 868 869 # ifdef USE_SSS 870 # ifdef USE_SSS_ALBEDO 871 # define CLOSURE_DEFAULT \ 872 Closure(vec3(0.0), 1.0, vec4(0.0), vec3(0.0), vec4(0.0), vec2(0.0), -1) 873 # else 874 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec4(0.0), vec2(0.0), -1) 875 # endif 876 # else 877 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec2(0.0), -1) 878 # endif 879 880 uniform int outputSsrId; 881 882 Closure closure_mix(Closure cl1, Closure cl2, float fac) 883 { 884 Closure cl; 885 886 if (cl1.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 887 cl1.ssr_normal = cl2.ssr_normal; 888 cl1.ssr_data = cl2.ssr_data; 889 cl1.ssr_id = cl2.ssr_id; 890 # ifdef USE_SSS 891 cl1.sss_data = cl2.sss_data; 892 # ifdef USE_SSS_ALBEDO 893 cl1.sss_albedo = cl2.sss_albedo; 894 # endif 895 # endif 896 } 897 if (cl2.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 898 cl2.ssr_normal = cl1.ssr_normal; 899 cl2.ssr_data = cl1.ssr_data; 900 cl2.ssr_id = cl1.ssr_id; 901 # ifdef USE_SSS 902 cl2.sss_data = cl1.sss_data; 903 # ifdef USE_SSS_ALBEDO 904 cl2.sss_albedo = cl1.sss_albedo; 905 # endif 906 # endif 907 } 908 909 /* When mixing SSR don't blend roughness. 910 * 911 * It makes no sense to mix them really, so we take either one of them and 912 * tone down its specularity (ssr_data.xyz) while keeping its roughness (ssr_data.w). 913 */ 914 if (cl1.ssr_id == outputSsrId) { 915 cl.ssr_data = mix(cl1.ssr_data.xyzw, vec4(vec3(0.0), cl1.ssr_data.w), fac); 916 cl.ssr_normal = cl1.ssr_normal; 917 cl.ssr_id = cl1.ssr_id; 918 } 919 else { 920 cl.ssr_data = mix(vec4(vec3(0.0), cl2.ssr_data.w), cl2.ssr_data.xyzw, fac); 921 cl.ssr_normal = cl2.ssr_normal; 922 cl.ssr_id = cl2.ssr_id; 923 } 924 925 cl.opacity = mix(cl1.opacity, cl2.opacity, fac); 926 cl.radiance = mix(cl1.radiance * cl1.opacity, cl2.radiance * cl2.opacity, fac); 927 cl.radiance /= max(1e-8, cl.opacity); 928 929 # ifdef USE_SSS 930 cl.sss_data.rgb = mix(cl1.sss_data.rgb, cl2.sss_data.rgb, fac); 931 cl.sss_data.a = (cl1.sss_data.a > 0.0) ? cl1.sss_data.a : cl2.sss_data.a; 932 # ifdef USE_SSS_ALBEDO 933 /* TODO Find a solution to this. Dither? */ 934 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 935 # endif 936 # endif 937 938 return cl; 939 } 940 941 Closure closure_add(Closure cl1, Closure cl2) 942 { 943 Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; 944 cl.radiance = cl1.radiance + cl2.radiance; 945 # ifdef USE_SSS 946 cl.sss_data = (cl1.sss_data.a > 0.0) ? cl1.sss_data : cl2.sss_data; 947 /* Add radiance that was supposed to be filtered but was rejected. */ 948 cl.radiance += (cl1.sss_data.a > 0.0) ? cl2.sss_data.rgb : cl1.sss_data.rgb; 949 # ifdef USE_SSS_ALBEDO 950 /* TODO Find a solution to this. Dither? */ 951 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 952 # endif 953 # endif 954 cl.opacity = saturate(cl1.opacity + cl2.opacity); 955 return cl; 956 } 957 958 Closure closure_emission(vec3 rgb) 959 { 960 Closure cl = CLOSURE_DEFAULT; 961 cl.radiance = rgb; 962 return cl; 963 } 964 965 # if defined(MESH_SHADER) && !defined(USE_ALPHA_HASH) && !defined(USE_ALPHA_CLIP) && \ 966 !defined(SHADOW_SHADER) && !defined(USE_MULTIPLY) 967 layout(location = 0) out vec4 fragColor; 968 layout(location = 1) out vec4 ssrNormals; 969 layout(location = 2) out vec4 ssrData; 970 # ifdef USE_SSS 971 layout(location = 3) out vec4 sssData; 972 # ifdef USE_SSS_ALBEDO 973 layout(location = 4) out vec4 sssAlbedo; 974 # endif /* USE_SSS_ALBEDO */ 975 # endif /* USE_SSS */ 976 977 Closure nodetree_exec(void); /* Prototype */ 978 979 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 980 /* Prototype because this file is included before volumetric_lib.glsl */ 981 vec4 volumetric_resolve(vec4 scene_color, vec2 frag_uvs, float frag_depth); 982 # endif 983 984 # define NODETREE_EXEC 985 void main() 986 { 987 Closure cl = nodetree_exec(); 988 # ifndef USE_ALPHA_BLEND 989 /* Prevent alpha hash material writing into alpha channel. */ 990 cl.opacity = 1.0; 991 # endif 992 993 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 994 /* XXX fragile, better use real viewport resolution */ 995 vec2 uvs = gl_FragCoord.xy / vec2(2 * textureSize(maxzBuffer, 0).xy); 996 fragColor.rgb = volumetric_resolve(vec4(cl.radiance, cl.opacity), uvs, gl_FragCoord.z).rgb; 997 fragColor.a = cl.opacity; 998 # else 999 fragColor = vec4(cl.radiance, cl.opacity); 1000 # endif 1001 1002 ssrNormals = cl.ssr_normal.xyyy; 1003 ssrData = cl.ssr_data; 1004 # ifdef USE_SSS 1005 sssData = cl.sss_data; 1006 # ifdef USE_SSS_ALBEDO 1007 sssAlbedo = cl.sss_albedo.rgbb; 1008 # endif 1009 # endif 1010 1011 /* For Probe capture */ 1012 # ifdef USE_SSS 1013 # ifdef USE_SSS_ALBEDO 1014 fragColor.rgb += cl.sss_data.rgb * cl.sss_albedo.rgb * float(!sssToggle); 1015 # else 1016 fragColor.rgb += cl.sss_data.rgb * float(!sssToggle); 1017 # endif 1018 # endif 1019 } 1020 1021 # endif /* MESH_SHADER && !SHADOW_SHADER */ 1022 1023 #endif /* VOLUMETRICS */ 1024 1025 Closure nodetree_exec(void); /* Prototype */ 1026 1027 /* TODO find a better place */ 1028 #ifdef USE_MULTIPLY 1029 1030 out vec4 fragColor; 1031 1032 # define NODETREE_EXEC 1033 void main() 1034 { 1035 Closure cl = nodetree_exec(); 1036 fragColor = vec4(mix(vec3(1.0), cl.radiance, cl.opacity), 1.0); 1037 } 1038 #endif 1039 1040 uniform sampler1D texHammersley; 1041 uniform sampler2D texJitter; 1042 uniform float sampleCount; 1043 uniform float invSampleCount; 1044 1045 vec2 jitternoise = vec2(0.0); 1046 1047 #ifndef UTIL_TEX 1048 # define UTIL_TEX 1049 uniform sampler2DArray utilTex; 1050 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 1051 #endif /* UTIL_TEX */ 1052 1053 void setup_noise(void) 1054 { 1055 jitternoise = texelfetch_noise_tex(gl_FragCoord.xy).rg; /* Global variable */ 1056 } 1057 1058 #ifdef HAMMERSLEY_SIZE 1059 vec3 hammersley_3d(float i, float invsamplenbr) 1060 { 1061 vec3 Xi; /* Theta, cos(Phi), sin(Phi) */ 1062 1063 Xi.x = i * invsamplenbr; /* i/samples */ 1064 Xi.x = fract(Xi.x + jitternoise.x); 1065 1066 int u = int(mod(i + jitternoise.y * HAMMERSLEY_SIZE, HAMMERSLEY_SIZE)); 1067 1068 Xi.yz = texelFetch(texHammersley, u, 0).rg; 1069 1070 return Xi; 1071 } 1072 1073 vec3 hammersley_3d(float i) 1074 { 1075 return hammersley_3d(i, invSampleCount); 1076 } 1077 #endif 1078 1079 /* -------------- BSDFS -------------- */ 1080 1081 float pdf_ggx_reflect(float NH, float a2) 1082 { 1083 return NH * a2 / D_ggx_opti(NH, a2); 1084 } 1085 1086 float pdf_hemisphere() 1087 { 1088 return 0.5 * M_1_PI; 1089 } 1090 1091 vec3 sample_ggx(vec3 rand, float a2) 1092 { 1093 /* Theta is the aperture angle of the cone */ 1094 float z = sqrt((1.0 - rand.x) / (1.0 + a2 * rand.x - rand.x)); /* cos theta */ 1095 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1096 float x = r * rand.y; 1097 float y = r * rand.z; 1098 1099 /* Microfacet Normal */ 1100 return vec3(x, y, z); 1101 } 1102 1103 vec3 sample_ggx(vec3 rand, float a2, vec3 N, vec3 T, vec3 B, out float NH) 1104 { 1105 vec3 Ht = sample_ggx(rand, a2); 1106 NH = Ht.z; 1107 return tangent_to_world(Ht, N, T, B); 1108 } 1109 1110 #ifdef HAMMERSLEY_SIZE 1111 vec3 sample_ggx(float nsample, float a2, vec3 N, vec3 T, vec3 B) 1112 { 1113 vec3 Xi = hammersley_3d(nsample); 1114 vec3 Ht = sample_ggx(Xi, a2); 1115 return tangent_to_world(Ht, N, T, B); 1116 } 1117 1118 vec3 sample_hemisphere(float nsample, vec3 N, vec3 T, vec3 B) 1119 { 1120 vec3 Xi = hammersley_3d(nsample); 1121 1122 float z = Xi.x; /* cos theta */ 1123 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1124 float x = r * Xi.y; 1125 float y = r * Xi.z; 1126 1127 vec3 Ht = vec3(x, y, z); 1128 1129 return tangent_to_world(Ht, N, T, B); 1130 } 1131 1132 vec3 sample_cone(float nsample, float angle, vec3 N, vec3 T, vec3 B) 1133 { 1134 vec3 Xi = hammersley_3d(nsample); 1135 1136 float z = cos(angle * Xi.x); /* cos theta */ 1137 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1138 float x = r * Xi.y; 1139 float y = r * Xi.z; 1140 1141 vec3 Ht = vec3(x, y, z); 1142 1143 return tangent_to_world(Ht, N, T, B); 1144 } 1145 #endif 1146 1147 uniform samplerCube probeDepth; 1148 uniform int outputSize; 1149 uniform float lodFactor; 1150 uniform float storedTexelSize; 1151 uniform float lodMax; 1152 uniform float nearClip; 1153 uniform float farClip; 1154 uniform float visibilityRange; 1155 uniform float visibilityBlur; 1156 1157 out vec4 FragColor; 1158 1159 vec3 octahedral_to_cubemap_proj(vec2 co) 1160 { 1161 co = co * 2.0 - 1.0; 1162 1163 vec2 abs_co = abs(co); 1164 vec3 v = vec3(co, 1.0 - (abs_co.x + abs_co.y)); 1165 1166 if (abs_co.x + abs_co.y > 1.0) { 1167 v.xy = (abs(co.yx) - 1.0) * -sign(co.xy); 1168 } 1169 1170 return v; 1171 } 1172 1173 float linear_depth(float z) 1174 { 1175 return (nearClip * farClip) / (z * (nearClip - farClip) + farClip); 1176 } 1177 1178 float get_world_distance(float depth, vec3 cos) 1179 { 1180 float is_background = step(1.0, depth); 1181 depth = linear_depth(depth); 1182 depth += 1e1 * is_background; 1183 cos = normalize(abs(cos)); 1184 float cos_vec = max(cos.x, max(cos.y, cos.z)); 1185 return depth / cos_vec; 1186 } 1187 1188 void main() 1189 { 1190 ivec2 texel = ivec2(gl_FragCoord.xy) % ivec2(outputSize); 1191 1192 vec3 cos; 1193 1194 cos.xy = (vec2(texel) + 0.5) * storedTexelSize; 1195 1196 /* add a 2 pixel border to ensure filtering is correct */ 1197 cos.xy = (cos.xy - storedTexelSize) / (1.0 - 2.0 * storedTexelSize); 1198 1199 float pattern = 1.0; 1200 1201 /* edge mirroring : only mirror if directly adjacent 1202 * (not diagonally adjacent) */ 1203 vec2 m = abs(cos.xy - 0.5) + 0.5; 1204 vec2 f = floor(m); 1205 if (f.x - f.y != 0.0) { 1206 cos.xy = 1.0 - cos.xy; 1207 } 1208 1209 /* clamp to [0-1] */ 1210 cos.xy = fract(cos.xy); 1211 1212 /* get cubemap vector */ 1213 cos = normalize(octahedral_to_cubemap_proj(cos.xy)); 1214 1215 vec3 T, B; 1216 make_orthonormal_basis(cos, T, B); /* Generate tangent space */ 1217 1218 vec2 accum = vec2(0.0); 1219 1220 for (float i = 0; i < sampleCount; i++) { 1221 vec3 sample = sample_cone(i, M_PI_2 * visibilityBlur, cos, T, B); 1222 float depth = texture(probeDepth, sample).r; 1223 depth = get_world_distance(depth, sample); 1224 accum += vec2(depth, depth * depth); 1225 } 1226 1227 accum *= invSampleCount; 1228 accum = abs(accum); 1229 1230 /* Encode to normalized RGBA 8 */ 1231 FragColor = visibility_encode(accum, visibilityRange); 1232 } 0(965) : error C0105: Syntax error in #if 0(965) : error C0105: Syntax error in #if 0(966) : error C0000: syntax error, unexpected '!' at token "!" 0(1188) : error C1013: function "main" is already defined at 0(985) GPUTexture: create : TEXTURE_1D, RG16F, w : 1024, h : 0, d : 0, comp : 2, size : 0.00 MiB GPUTexture: create : TEXTURE_2D_ARRAY, RGBA8, w : 4, h : 4, d : 1, comp : 4, size : 0.00 MiB GPUTexture: create : TEXTURE_2D_ARRAY, R11F_G11F_B10F, w : 1255, h : 1255, d : 1, comp : 3, size : 6.01 MiB GPUTexture: create : TEXTURE_2D_ARRAY, RGBA8, w : 1, h : 1, d : 1, comp : 4, size : 0.00 MiB GPUShader: compile error: ===== shader string 1 ==== 1 #version 330 ===== shader string 2 ==== 2 #define GPU_FRAGMENT_SHADER ===== shader string 3 ==== 3 #extension GL_ARB_texture_gather: enable 4 #define GPU_ARB_texture_gather 5 #extension GL_ARB_texture_query_lod: enable ===== shader string 4 ==== 6 #define GPU_NVIDIA 7 #define OS_WIN ===== shader string 5 ==== 8 #define EEVEE_ENGINE 9 #define MAX_PROBE 128 10 #define MAX_GRID 64 11 #define MAX_PLANAR 16 12 #define MAX_LIGHT 128 13 #define MAX_SHADOW 256 14 #define MAX_SHADOW_CUBE (256 - 4 * 8) 15 #define MAX_SHADOW_CASCADE 8 16 #define MAX_CASCADE_NUM 4 17 #define IRRADIANCE_HL2 18 #define PROBE_CAPTURE ===== shader string 6 ==== 19 /* keep in sync with DRWManager.view_data */ 20 layout(std140) uniform viewBlock 21 { 22 /* Same order as DRWViewportMatrixType */ 23 mat4 ViewProjectionMatrix; 24 mat4 ViewProjectionMatrixInverse; 25 mat4 ViewMatrix; 26 mat4 ViewMatrixInverse; 27 mat4 ProjectionMatrix; 28 mat4 ProjectionMatrixInverse; 29 30 vec4 CameraTexCoFactors; 31 32 vec4 clipPlanes[2]; 33 }; 34 35 layout(std140) uniform common_block 36 { 37 mat4 pastViewProjectionMatrix; 38 vec4 viewVecs[2]; 39 vec2 mipRatio[10]; /* To correct mip level texel mis-alignement */ 40 /* Ambient Occlusion */ 41 vec4 aoParameters[2]; 42 /* Volumetric */ 43 ivec4 volTexSize; 44 vec4 volDepthParameters; /* Parameters to the volume Z equation */ 45 vec4 volInvTexSize; 46 vec4 volJitter; 47 vec4 volCoordScale; /* To convert volume uvs to screen uvs */ 48 float volHistoryAlpha; 49 float volLightClamp; 50 float volShadowSteps; 51 bool volUseLights; 52 /* Screen Space Reflections */ 53 vec4 ssrParameters; 54 float ssrBorderFac; 55 float ssrMaxRoughness; 56 float ssrFireflyFac; 57 float ssrBrdfBias; 58 bool ssrToggle; 59 /* SubSurface Scattering */ 60 float sssJitterThreshold; 61 bool sssToggle; 62 /* Specular */ 63 bool specToggle; 64 /* Lights */ 65 int laNumLight; 66 /* Probes */ 67 int prbNumPlanar; 68 int prbNumRenderCube; 69 int prbNumRenderGrid; 70 int prbIrradianceVisSize; 71 float prbIrradianceSmooth; 72 float prbLodCubeMax; 73 float prbLodPlanarMax; 74 /* Misc*/ 75 int hizMipOffset; 76 int rayType; 77 float rayDepth; 78 }; 79 80 /* rayType (keep in sync with ray_type) */ 81 #define EEVEE_RAY_CAMERA 0 82 #define EEVEE_RAY_SHADOW 1 83 #define EEVEE_RAY_DIFFUSE 2 84 #define EEVEE_RAY_GLOSSY 3 85 86 /* aoParameters */ 87 #define aoDistance aoParameters[0].x 88 #define aoSamples aoParameters[0].y /* UNUSED */ 89 #define aoFactor aoParameters[0].z 90 #define aoInvSamples aoParameters[0].w /* UNUSED */ 91 92 #define aoOffset aoParameters[1].x /* UNUSED */ 93 #define aoBounceFac aoParameters[1].y 94 #define aoQuality aoParameters[1].z 95 #define aoSettings aoParameters[1].w 96 97 /* ssrParameters */ 98 #define ssrQuality ssrParameters.x 99 #define ssrThickness ssrParameters.y 100 #define ssrPixelSize ssrParameters.zw 101 102 #define M_PI 3.14159265358979323846 /* pi */ 103 #define M_2PI 6.28318530717958647692 /* 2*pi */ 104 #define M_PI_2 1.57079632679489661923 /* pi/2 */ 105 #define M_1_PI 0.318309886183790671538 /* 1/pi */ 106 #define M_1_2PI 0.159154943091895335768 /* 1/(2*pi) */ 107 #define M_1_PI2 0.101321183642337771443 /* 1/(pi^2) */ 108 109 #define LUT_SIZE 64 110 111 /* Buffers */ 112 uniform sampler2D colorBuffer; 113 uniform sampler2D depthBuffer; 114 uniform sampler2D maxzBuffer; 115 uniform sampler2D minzBuffer; 116 uniform sampler2DArray planarDepth; 117 118 #define cameraForward normalize(ViewMatrixInverse[2].xyz) 119 #define cameraPos ViewMatrixInverse[3].xyz 120 #define cameraVec \ 121 ((ProjectionMatrix[3][3] == 0.0) ? normalize(cameraPos - worldPosition) : cameraForward) 122 #define viewCameraVec \ 123 ((ProjectionMatrix[3][3] == 0.0) ? normalize(-viewPosition) : vec3(0.0, 0.0, 1.0)) 124 125 /* ------- Structures -------- */ 126 127 /* ------ Lights ----- */ 128 struct LightData { 129 vec4 position_influence; /* w : InfluenceRadius (inversed and squared) */ 130 vec4 color_spec; /* w : Spec Intensity */ 131 vec4 spotdata_radius_shadow; /* x : spot size, y : spot blend, z : radius, w: shadow id */ 132 vec4 rightvec_sizex; /* xyz: Normalized up vector, w: area size X or spot scale X */ 133 vec4 upvec_sizey; /* xyz: Normalized right vector, w: area size Y or spot scale Y */ 134 vec4 forwardvec_type; /* xyz: Normalized forward vector, w: Light Type */ 135 }; 136 137 /* convenience aliases */ 138 #define l_color color_spec.rgb 139 #define l_spec color_spec.a 140 #define l_position position_influence.xyz 141 #define l_influence position_influence.w 142 #define l_sizex rightvec_sizex.w 143 #define l_sizey upvec_sizey.w 144 #define l_right rightvec_sizex.xyz 145 #define l_up upvec_sizey.xyz 146 #define l_forward forwardvec_type.xyz 147 #define l_type forwardvec_type.w 148 #define l_spot_size spotdata_radius_shadow.x 149 #define l_spot_blend spotdata_radius_shadow.y 150 #define l_radius spotdata_radius_shadow.z 151 #define l_shadowid spotdata_radius_shadow.w 152 153 /* ------ Shadows ----- */ 154 #ifndef MAX_CASCADE_NUM 155 # define MAX_CASCADE_NUM 4 156 #endif 157 158 struct ShadowData { 159 vec4 near_far_bias_exp; 160 vec4 shadow_data_start_end; 161 vec4 contact_shadow_data; 162 }; 163 164 struct ShadowCubeData { 165 vec4 position; 166 }; 167 168 struct ShadowCascadeData { 169 mat4 shadowmat[MAX_CASCADE_NUM]; 170 vec4 split_start_distances; 171 vec4 split_end_distances; 172 }; 173 174 /* convenience aliases */ 175 #define sh_near near_far_bias_exp.x 176 #define sh_far near_far_bias_exp.y 177 #define sh_bias near_far_bias_exp.z 178 #define sh_exp near_far_bias_exp.w 179 #define sh_bleed near_far_bias_exp.w 180 #define sh_tex_start shadow_data_start_end.x 181 #define sh_data_start shadow_data_start_end.y 182 #define sh_multi_nbr shadow_data_start_end.z 183 #define sh_blur shadow_data_start_end.w 184 #define sh_contact_dist contact_shadow_data.x 185 #define sh_contact_offset contact_shadow_data.y 186 #define sh_contact_spread contact_shadow_data.z 187 #define sh_contact_thickness contact_shadow_data.w 188 189 /* ------- Convenience functions --------- */ 190 191 vec3 mul(mat3 m, vec3 v) 192 { 193 return m * v; 194 } 195 mat3 mul(mat3 m1, mat3 m2) 196 { 197 return m1 * m2; 198 } 199 vec3 transform_direction(mat4 m, vec3 v) 200 { 201 return mat3(m) * v; 202 } 203 vec3 transform_point(mat4 m, vec3 v) 204 { 205 return (m * vec4(v, 1.0)).xyz; 206 } 207 vec3 project_point(mat4 m, vec3 v) 208 { 209 vec4 tmp = m * vec4(v, 1.0); 210 return tmp.xyz / tmp.w; 211 } 212 213 #define min3(a, b, c) min(a, min(b, c)) 214 #define min4(a, b, c, d) min(a, min3(b, c, d)) 215 #define min5(a, b, c, d, e) min(a, min4(b, c, d, e)) 216 #define min6(a, b, c, d, e, f) min(a, min5(b, c, d, e, f)) 217 #define min7(a, b, c, d, e, f, g) min(a, min6(b, c, d, e, f, g)) 218 #define min8(a, b, c, d, e, f, g, h) min(a, min7(b, c, d, e, f, g, h)) 219 #define min9(a, b, c, d, e, f, g, h, i) min(a, min8(b, c, d, e, f, g, h, i)) 220 221 #define max3(a, b, c) max(a, max(b, c)) 222 #define max4(a, b, c, d) max(a, max3(b, c, d)) 223 #define max5(a, b, c, d, e) max(a, max4(b, c, d, e)) 224 #define max6(a, b, c, d, e, f) max(a, max5(b, c, d, e, f)) 225 #define max7(a, b, c, d, e, f, g) max(a, max6(b, c, d, e, f, g)) 226 #define max8(a, b, c, d, e, f, g, h) max(a, max7(b, c, d, e, f, g, h)) 227 #define max9(a, b, c, d, e, f, g, h, i) max(a, max8(b, c, d, e, f, g, h, i)) 228 229 #define avg3(a, b, c) (a + b + c) * (1.0 / 3.0) 230 #define avg4(a, b, c, d) (a + b + c + d) * (1.0 / 4.0) 231 #define avg5(a, b, c, d, e) (a + b + c + d + e) * (1.0 / 5.0) 232 #define avg6(a, b, c, d, e, f) (a + b + c + d + e + f) * (1.0 / 6.0) 233 #define avg7(a, b, c, d, e, f, g) (a + b + c + d + e + f + g) * (1.0 / 7.0) 234 #define avg8(a, b, c, d, e, f, g, h) (a + b + c + d + e + f + g + h) * (1.0 / 8.0) 235 #define avg9(a, b, c, d, e, f, g, h, i) (a + b + c + d + e + f + g + h + i) * (1.0 / 9.0) 236 237 float min_v2(vec2 v) 238 { 239 return min(v.x, v.y); 240 } 241 float min_v3(vec3 v) 242 { 243 return min(v.x, min(v.y, v.z)); 244 } 245 float max_v2(vec2 v) 246 { 247 return max(v.x, v.y); 248 } 249 float max_v3(vec3 v) 250 { 251 return max(v.x, max(v.y, v.z)); 252 } 253 254 float sum(vec2 v) 255 { 256 return dot(vec2(1.0), v); 257 } 258 float sum(vec3 v) 259 { 260 return dot(vec3(1.0), v); 261 } 262 float sum(vec4 v) 263 { 264 return dot(vec4(1.0), v); 265 } 266 267 float saturate(float a) 268 { 269 return clamp(a, 0.0, 1.0); 270 } 271 vec2 saturate(vec2 a) 272 { 273 return clamp(a, 0.0, 1.0); 274 } 275 vec3 saturate(vec3 a) 276 { 277 return clamp(a, 0.0, 1.0); 278 } 279 vec4 saturate(vec4 a) 280 { 281 return clamp(a, 0.0, 1.0); 282 } 283 284 float distance_squared(vec2 a, vec2 b) 285 { 286 a -= b; 287 return dot(a, a); 288 } 289 float distance_squared(vec3 a, vec3 b) 290 { 291 a -= b; 292 return dot(a, a); 293 } 294 float len_squared(vec3 a) 295 { 296 return dot(a, a); 297 } 298 299 float inverse_distance(vec3 V) 300 { 301 return max(1 / length(V), 1e-8); 302 } 303 304 vec2 mip_ratio_interp(float mip) 305 { 306 float low_mip = floor(mip); 307 return mix(mipRatio[int(low_mip)], mipRatio[int(low_mip + 1.0)], mip - low_mip); 308 } 309 310 /* ------- RNG ------- */ 311 312 float wang_hash_noise(uint s) 313 { 314 s = (s ^ 61u) ^ (s >> 16u); 315 s *= 9u; 316 s = s ^ (s >> 4u); 317 s *= 0x27d4eb2du; 318 s = s ^ (s >> 15u); 319 320 return fract(float(s) / 4294967296.0); 321 } 322 323 /* ------- Fast Math ------- */ 324 325 /* [Drobot2014a] Low Level Optimizations for GCN */ 326 float fast_sqrt(float v) 327 { 328 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 329 } 330 331 vec2 fast_sqrt(vec2 v) 332 { 333 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 334 } 335 336 /* [Eberly2014] GPGPU Programming for Games and Science */ 337 float fast_acos(float v) 338 { 339 float res = -0.156583 * abs(v) + M_PI_2; 340 res *= fast_sqrt(1.0 - abs(v)); 341 return (v >= 0) ? res : M_PI - res; 342 } 343 344 vec2 fast_acos(vec2 v) 345 { 346 vec2 res = -0.156583 * abs(v) + M_PI_2; 347 res *= fast_sqrt(1.0 - abs(v)); 348 v.x = (v.x >= 0) ? res.x : M_PI - res.x; 349 v.y = (v.y >= 0) ? res.y : M_PI - res.y; 350 return v; 351 } 352 353 float point_plane_projection_dist(vec3 lineorigin, vec3 planeorigin, vec3 planenormal) 354 { 355 return dot(planenormal, planeorigin - lineorigin); 356 } 357 358 float line_plane_intersect_dist(vec3 lineorigin, 359 vec3 linedirection, 360 vec3 planeorigin, 361 vec3 planenormal) 362 { 363 return dot(planenormal, planeorigin - lineorigin) / dot(planenormal, linedirection); 364 } 365 366 float line_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec4 plane) 367 { 368 vec3 plane_co = plane.xyz * (-plane.w / len_squared(plane.xyz)); 369 vec3 h = lineorigin - plane_co; 370 return -dot(plane.xyz, h) / dot(plane.xyz, linedirection); 371 } 372 373 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin, vec3 planenormal) 374 { 375 float dist = line_plane_intersect_dist(lineorigin, linedirection, planeorigin, planenormal); 376 return lineorigin + linedirection * dist; 377 } 378 379 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec4 plane) 380 { 381 float dist = line_plane_intersect_dist(lineorigin, linedirection, plane); 382 return lineorigin + linedirection * dist; 383 } 384 385 float line_aligned_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 386 { 387 /* aligned plane normal */ 388 vec3 L = planeorigin - lineorigin; 389 float diskdist = length(L); 390 vec3 planenormal = -normalize(L); 391 return -diskdist / dot(planenormal, linedirection); 392 } 393 394 vec3 line_aligned_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 395 { 396 float dist = line_aligned_plane_intersect_dist(lineorigin, linedirection, planeorigin); 397 if (dist < 0) { 398 /* if intersection is behind we fake the intersection to be 399 * really far and (hopefully) not inside the radius of interest */ 400 dist = 1e16; 401 } 402 return lineorigin + linedirection * dist; 403 } 404 405 float line_unit_sphere_intersect_dist(vec3 lineorigin, vec3 linedirection) 406 { 407 float a = dot(linedirection, linedirection); 408 float b = dot(linedirection, lineorigin); 409 float c = dot(lineorigin, lineorigin) - 1; 410 411 float dist = 1e15; 412 float determinant = b * b - a * c; 413 if (determinant >= 0) { 414 dist = (sqrt(determinant) - b) / a; 415 } 416 417 return dist; 418 } 419 420 float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection) 421 { 422 /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ */ 423 vec3 firstplane = (vec3(1.0) - lineorigin) / linedirection; 424 vec3 secondplane = (vec3(-1.0) - lineorigin) / linedirection; 425 vec3 furthestplane = max(firstplane, secondplane); 426 427 return min_v3(furthestplane); 428 } 429 430 /* Return texture coordinates to sample Surface LUT */ 431 vec2 lut_coords(float cosTheta, float roughness) 432 { 433 float theta = acos(cosTheta); 434 vec2 coords = vec2(roughness, theta / M_PI_2); 435 436 /* scale and bias coordinates, for correct filtered lookup */ 437 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 438 } 439 440 vec2 lut_coords_ltc(float cosTheta, float roughness) 441 { 442 vec2 coords = vec2(roughness, sqrt(1.0 - cosTheta)); 443 444 /* scale and bias coordinates, for correct filtered lookup */ 445 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 446 } 447 448 /* -- Tangent Space conversion -- */ 449 vec3 tangent_to_world(vec3 vector, vec3 N, vec3 T, vec3 B) 450 { 451 return T * vector.x + B * vector.y + N * vector.z; 452 } 453 454 vec3 world_to_tangent(vec3 vector, vec3 N, vec3 T, vec3 B) 455 { 456 return vec3(dot(T, vector), dot(B, vector), dot(N, vector)); 457 } 458 459 void make_orthonormal_basis(vec3 N, out vec3 T, out vec3 B) 460 { 461 vec3 UpVector = abs(N.z) < 0.99999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 462 T = normalize(cross(UpVector, N)); 463 B = cross(N, T); 464 } 465 466 /* ---- Opengl Depth conversion ---- */ 467 468 float linear_depth(bool is_persp, float z, float zf, float zn) 469 { 470 if (is_persp) { 471 return (zn * zf) / (z * (zn - zf) + zf); 472 } 473 else { 474 return (z * 2.0 - 1.0) * zf; 475 } 476 } 477 478 float buffer_depth(bool is_persp, float z, float zf, float zn) 479 { 480 if (is_persp) { 481 return (zf * (zn - z)) / (z * (zn - zf)); 482 } 483 else { 484 return (z / (zf * 2.0)) + 0.5; 485 } 486 } 487 488 float get_view_z_from_depth(float depth) 489 { 490 if (ProjectionMatrix[3][3] == 0.0) { 491 float d = 2.0 * depth - 1.0; 492 return -ProjectionMatrix[3][2] / (d + ProjectionMatrix[2][2]); 493 } 494 else { 495 return viewVecs[0].z + depth * viewVecs[1].z; 496 } 497 } 498 499 float get_depth_from_view_z(float z) 500 { 501 if (ProjectionMatrix[3][3] == 0.0) { 502 float d = (-ProjectionMatrix[3][2] / z) - ProjectionMatrix[2][2]; 503 return d * 0.5 + 0.5; 504 } 505 else { 506 return (z - viewVecs[0].z) / viewVecs[1].z; 507 } 508 } 509 510 vec2 get_uvs_from_view(vec3 view) 511 { 512 vec3 ndc = project_point(ProjectionMatrix, view); 513 return ndc.xy * 0.5 + 0.5; 514 } 515 516 vec3 get_view_space_from_depth(vec2 uvcoords, float depth) 517 { 518 if (ProjectionMatrix[3][3] == 0.0) { 519 return vec3(viewVecs[0].xy + uvcoords * viewVecs[1].xy, 1.0) * get_view_z_from_depth(depth); 520 } 521 else { 522 return viewVecs[0].xyz + vec3(uvcoords, depth) * viewVecs[1].xyz; 523 } 524 } 525 526 vec3 get_world_space_from_depth(vec2 uvcoords, float depth) 527 { 528 return (ViewMatrixInverse * vec4(get_view_space_from_depth(uvcoords, depth), 1.0)).xyz; 529 } 530 531 vec3 get_specular_reflection_dominant_dir(vec3 N, vec3 V, float roughness) 532 { 533 vec3 R = -reflect(V, N); 534 float smoothness = 1.0 - roughness; 535 float fac = smoothness * (sqrt(smoothness) + roughness); 536 return normalize(mix(N, R, fac)); 537 } 538 539 float specular_occlusion(float NV, float AO, float roughness) 540 { 541 return saturate(pow(NV + AO, roughness) - 1.0 + AO); 542 } 543 544 /* --- Refraction utils --- */ 545 546 float ior_from_f0(float f0) 547 { 548 float f = sqrt(f0); 549 return (-f - 1.0) / (f - 1.0); 550 } 551 552 float f0_from_ior(float eta) 553 { 554 float A = (eta - 1.0) / (eta + 1.0); 555 return A * A; 556 } 557 558 vec3 get_specular_refraction_dominant_dir(vec3 N, vec3 V, float roughness, float ior) 559 { 560 /* TODO: This a bad approximation. Better approximation should fit 561 * the refracted vector and roughness into the best prefiltered reflection 562 * lobe. */ 563 /* Correct the IOR for ior < 1.0 to not see the abrupt delimitation or the TIR */ 564 ior = (ior < 1.0) ? mix(ior, 1.0, roughness) : ior; 565 float eta = 1.0 / ior; 566 567 float NV = dot(N, -V); 568 569 /* Custom Refraction. */ 570 float k = 1.0 - eta * eta * (1.0 - NV * NV); 571 k = max(0.0, k); /* Only this changes. */ 572 vec3 R = eta * -V - (eta * NV + sqrt(k)) * N; 573 574 return R; 575 } 576 577 float get_btdf_lut(sampler2DArray btdf_lut_tex, float NV, float roughness, float ior) 578 { 579 const vec3 lut_scale_bias_texel_size = vec3((LUT_SIZE - 1.0), 0.5, 1.5) / LUT_SIZE; 580 581 vec3 coords; 582 /* Try to compensate for the low resolution and interpolation error. */ 583 coords.x = (ior > 1.0) ? (0.9 + lut_scale_bias_texel_size.z) + 584 (0.1 - lut_scale_bias_texel_size.z) * f0_from_ior(ior) : 585 (0.9 + lut_scale_bias_texel_size.z) * ior * ior; 586 coords.y = 1.0 - saturate(NV); 587 coords.xy *= lut_scale_bias_texel_size.x; 588 coords.xy += lut_scale_bias_texel_size.y; 589 590 const float lut_lvl_ofs = 4.0; /* First texture lvl of roughness. */ 591 const float lut_lvl_scale = 16.0; /* How many lvl of roughness in the lut. */ 592 593 float mip = roughness * lut_lvl_scale; 594 float mip_floor = floor(mip); 595 596 coords.z = lut_lvl_ofs + mip_floor + 1.0; 597 float btdf_high = textureLod(btdf_lut_tex, coords, 0.0).r; 598 599 coords.z -= 1.0; 600 float btdf_low = textureLod(btdf_lut_tex, coords, 0.0).r; 601 602 float btdf = (ior == 1.0) ? 1.0 : mix(btdf_low, btdf_high, mip - coords.z); 603 604 return btdf; 605 } 606 607 /* ---- Encode / Decode Normal buffer data ---- */ 608 /* From http://aras-p.info/texts/CompactNormalStorage.html 609 * Using Method #4: Spheremap Transform */ 610 vec2 normal_encode(vec3 n, vec3 view) 611 { 612 float p = sqrt(n.z * 8.0 + 8.0); 613 return n.xy / p + 0.5; 614 } 615 616 vec3 normal_decode(vec2 enc, vec3 view) 617 { 618 vec2 fenc = enc * 4.0 - 2.0; 619 float f = dot(fenc, fenc); 620 float g = sqrt(1.0 - f / 4.0); 621 vec3 n; 622 n.xy = fenc * g; 623 n.z = 1 - f / 2; 624 return n; 625 } 626 627 /* ---- RGBM (shared multiplier) encoding ---- */ 628 /* From http://iwasbeingirony.blogspot.fr/2010/06/difference-between-rgbm-and-rgbd.html */ 629 630 /* Higher RGBM_MAX_RANGE gives imprecision issues in low intensity. */ 631 #define RGBM_MAX_RANGE 512.0 632 633 vec4 rgbm_encode(vec3 rgb) 634 { 635 float maxRGB = max_v3(rgb); 636 float M = maxRGB / RGBM_MAX_RANGE; 637 M = ceil(M * 255.0) / 255.0; 638 return vec4(rgb / (M * RGBM_MAX_RANGE), M); 639 } 640 641 vec3 rgbm_decode(vec4 data) 642 { 643 return data.rgb * (data.a * RGBM_MAX_RANGE); 644 } 645 646 /* ---- RGBE (shared exponent) encoding ---- */ 647 vec4 rgbe_encode(vec3 rgb) 648 { 649 float maxRGB = max_v3(rgb); 650 float fexp = ceil(log2(maxRGB)); 651 return vec4(rgb / exp2(fexp), (fexp + 128.0) / 255.0); 652 } 653 654 vec3 rgbe_decode(vec4 data) 655 { 656 float fexp = data.a * 255.0 - 128.0; 657 return data.rgb * exp2(fexp); 658 } 659 660 #if 1 661 # define irradiance_encode rgbe_encode 662 # define irradiance_decode rgbe_decode 663 #else /* No ecoding (when using floating point format) */ 664 # define irradiance_encode(X) (X).rgbb 665 # define irradiance_decode(X) (X).rgb 666 #endif 667 668 /* Irradiance Visibility Encoding */ 669 #if 1 670 vec4 visibility_encode(vec2 accum, float range) 671 { 672 accum /= range; 673 674 vec4 data; 675 data.x = fract(accum.x); 676 data.y = floor(accum.x) / 255.0; 677 data.z = fract(accum.y); 678 data.w = floor(accum.y) / 255.0; 679 680 return data; 681 } 682 683 vec2 visibility_decode(vec4 data, float range) 684 { 685 return (data.xz + data.yw * 255.0) * range; 686 } 687 #else /* No ecoding (when using floating point format) */ 688 vec4 visibility_encode(vec2 accum, float range) 689 { 690 return accum.xyxy; 691 } 692 693 vec2 visibility_decode(vec4 data, float range) 694 { 695 return data.xy; 696 } 697 #endif 698 699 /* Fresnel monochromatic, perfect mirror */ 700 float F_eta(float eta, float cos_theta) 701 { 702 /* compute fresnel reflectance without explicitly computing 703 * the refracted direction */ 704 float c = abs(cos_theta); 705 float g = eta * eta - 1.0 + c * c; 706 float result; 707 708 if (g > 0.0) { 709 g = sqrt(g); 710 vec2 g_c = vec2(g) + vec2(c, -c); 711 float A = g_c.y / g_c.x; 712 A *= A; 713 g_c *= c; 714 float B = (g_c.y - 1.0) / (g_c.x + 1.0); 715 B *= B; 716 result = 0.5 * A * (1.0 + B); 717 } 718 else { 719 result = 1.0; /* TIR (no refracted component) */ 720 } 721 722 return result; 723 } 724 725 /* Fresnel color blend base on fresnel factor */ 726 vec3 F_color_blend(float eta, float fresnel, vec3 f0_color) 727 { 728 float f0 = F_eta(eta, 1.0); 729 float fac = saturate((fresnel - f0) / max(1e-8, 1.0 - f0)); 730 return mix(f0_color, vec3(1.0), fac); 731 } 732 733 /* Fresnel */ 734 vec3 F_schlick(vec3 f0, float cos_theta) 735 { 736 float fac = 1.0 - cos_theta; 737 float fac2 = fac * fac; 738 fac = fac2 * fac2 * fac; 739 740 /* Unreal specular matching : if specular color is below 2% intensity, 741 * (using green channel for intensity) treat as shadowning */ 742 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * fac + (1.0 - fac) * f0; 743 } 744 745 /* Fresnel approximation for LTC area lights (not MRP) */ 746 vec3 F_area(vec3 f0, vec2 lut) 747 { 748 /* Unreal specular matching : if specular color is below 2% intensity, 749 * treat as shadowning */ 750 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 751 } 752 753 /* Fresnel approximation for IBL */ 754 vec3 F_ibl(vec3 f0, vec2 lut) 755 { 756 /* Unreal specular matching : if specular color is below 2% intensity, 757 * treat as shadowning */ 758 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 759 } 760 761 /* GGX */ 762 float D_ggx_opti(float NH, float a2) 763 { 764 float tmp = (NH * a2 - NH) * NH + 1.0; 765 return M_PI * tmp * tmp; /* Doing RCP and mul a2 at the end */ 766 } 767 768 float G1_Smith_GGX(float NX, float a2) 769 { 770 /* Using Brian Karis approach and refactoring by NX/NX 771 * this way the (2*NL)*(2*NV) in G = G1(V) * G1(L) gets canceled by the brdf denominator 4*NL*NV 772 * Rcp is done on the whole G later 773 * Note that this is not convenient for the transmission formula */ 774 return NX + sqrt(NX * (NX - NX * a2) + a2); 775 /* return 2 / (1 + sqrt(1 + a2 * (1 - NX*NX) / (NX*NX) ) ); /* Reference function */ 776 } 777 778 float bsdf_ggx(vec3 N, vec3 L, vec3 V, float roughness) 779 { 780 float a = roughness; 781 float a2 = a * a; 782 783 vec3 H = normalize(L + V); 784 float NH = max(dot(N, H), 1e-8); 785 float NL = max(dot(N, L), 1e-8); 786 float NV = max(dot(N, V), 1e-8); 787 788 float G = G1_Smith_GGX(NV, a2) * G1_Smith_GGX(NL, a2); /* Doing RCP at the end */ 789 float D = D_ggx_opti(NH, a2); 790 791 /* Denominator is canceled by G1_Smith */ 792 /* bsdf = D * G / (4.0 * NL * NV); /* Reference function */ 793 return NL * a2 / (D * G); /* NL to Fit cycles Equation : line. 345 in bsdf_microfacet.h */ 794 } 795 796 void accumulate_light(vec3 light, float fac, inout vec4 accum) 797 { 798 accum += vec4(light, 1.0) * min(fac, (1.0 - accum.a)); 799 } 800 801 /* ----------- Cone Aperture Approximation --------- */ 802 803 /* Return a fitted cone angle given the input roughness */ 804 float cone_cosine(float r) 805 { 806 /* Using phong gloss 807 * roughness = sqrt(2/(gloss+2)) */ 808 float gloss = -2 + 2 / (r * r); 809 /* Drobot 2014 in GPUPro5 */ 810 // return cos(2.0 * sqrt(2.0 / (gloss + 2))); 811 /* Uludag 2014 in GPUPro5 */ 812 // return pow(0.244, 1 / (gloss + 1)); 813 /* Jimenez 2016 in Practical Realtime Strategies for Accurate Indirect Occlusion*/ 814 return exp2(-3.32193 * r * r); 815 } 816 817 /* --------- Closure ---------- */ 818 #ifdef VOLUMETRICS 819 820 struct Closure { 821 vec3 absorption; 822 vec3 scatter; 823 vec3 emission; 824 float anisotropy; 825 }; 826 827 # define CLOSURE_DEFAULT Closure(vec3(0.0), vec3(0.0), vec3(0.0), 0.0) 828 829 Closure closure_mix(Closure cl1, Closure cl2, float fac) 830 { 831 Closure cl; 832 cl.absorption = mix(cl1.absorption, cl2.absorption, fac); 833 cl.scatter = mix(cl1.scatter, cl2.scatter, fac); 834 cl.emission = mix(cl1.emission, cl2.emission, fac); 835 cl.anisotropy = mix(cl1.anisotropy, cl2.anisotropy, fac); 836 return cl; 837 } 838 839 Closure closure_add(Closure cl1, Closure cl2) 840 { 841 Closure cl; 842 cl.absorption = cl1.absorption + cl2.absorption; 843 cl.scatter = cl1.scatter + cl2.scatter; 844 cl.emission = cl1.emission + cl2.emission; 845 cl.anisotropy = (cl1.anisotropy + cl2.anisotropy) / 2.0; /* Average phase (no multi lobe) */ 846 return cl; 847 } 848 849 Closure closure_emission(vec3 rgb) 850 { 851 Closure cl = CLOSURE_DEFAULT; 852 cl.emission = rgb; 853 return cl; 854 } 855 856 #else /* VOLUMETRICS */ 857 858 struct Closure { 859 vec3 radiance; 860 float opacity; 861 # ifdef USE_SSS 862 vec4 sss_data; 863 # ifdef USE_SSS_ALBEDO 864 vec3 sss_albedo; 865 # endif 866 # endif 867 vec4 ssr_data; 868 vec2 ssr_normal; 869 int ssr_id; 870 }; 871 872 /* This is hacking ssr_id to tag transparent bsdf */ 873 # define TRANSPARENT_CLOSURE_FLAG -2 874 # define REFRACT_CLOSURE_FLAG -3 875 # define NO_SSR -999 876 877 # ifdef USE_SSS 878 # ifdef USE_SSS_ALBEDO 879 # define CLOSURE_DEFAULT \ 880 Closure(vec3(0.0), 1.0, vec4(0.0), vec3(0.0), vec4(0.0), vec2(0.0), -1) 881 # else 882 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec4(0.0), vec2(0.0), -1) 883 # endif 884 # else 885 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec2(0.0), -1) 886 # endif 887 888 uniform int outputSsrId; 889 890 Closure closure_mix(Closure cl1, Closure cl2, float fac) 891 { 892 Closure cl; 893 894 if (cl1.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 895 cl1.ssr_normal = cl2.ssr_normal; 896 cl1.ssr_data = cl2.ssr_data; 897 cl1.ssr_id = cl2.ssr_id; 898 # ifdef USE_SSS 899 cl1.sss_data = cl2.sss_data; 900 # ifdef USE_SSS_ALBEDO 901 cl1.sss_albedo = cl2.sss_albedo; 902 # endif 903 # endif 904 } 905 if (cl2.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 906 cl2.ssr_normal = cl1.ssr_normal; 907 cl2.ssr_data = cl1.ssr_data; 908 cl2.ssr_id = cl1.ssr_id; 909 # ifdef USE_SSS 910 cl2.sss_data = cl1.sss_data; 911 # ifdef USE_SSS_ALBEDO 912 cl2.sss_albedo = cl1.sss_albedo; 913 # endif 914 # endif 915 } 916 917 /* When mixing SSR don't blend roughness. 918 * 919 * It makes no sense to mix them really, so we take either one of them and 920 * tone down its specularity (ssr_data.xyz) while keeping its roughness (ssr_data.w). 921 */ 922 if (cl1.ssr_id == outputSsrId) { 923 cl.ssr_data = mix(cl1.ssr_data.xyzw, vec4(vec3(0.0), cl1.ssr_data.w), fac); 924 cl.ssr_normal = cl1.ssr_normal; 925 cl.ssr_id = cl1.ssr_id; 926 } 927 else { 928 cl.ssr_data = mix(vec4(vec3(0.0), cl2.ssr_data.w), cl2.ssr_data.xyzw, fac); 929 cl.ssr_normal = cl2.ssr_normal; 930 cl.ssr_id = cl2.ssr_id; 931 } 932 933 cl.opacity = mix(cl1.opacity, cl2.opacity, fac); 934 cl.radiance = mix(cl1.radiance * cl1.opacity, cl2.radiance * cl2.opacity, fac); 935 cl.radiance /= max(1e-8, cl.opacity); 936 937 # ifdef USE_SSS 938 cl.sss_data.rgb = mix(cl1.sss_data.rgb, cl2.sss_data.rgb, fac); 939 cl.sss_data.a = (cl1.sss_data.a > 0.0) ? cl1.sss_data.a : cl2.sss_data.a; 940 # ifdef USE_SSS_ALBEDO 941 /* TODO Find a solution to this. Dither? */ 942 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 943 # endif 944 # endif 945 946 return cl; 947 } 948 949 Closure closure_add(Closure cl1, Closure cl2) 950 { 951 Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; 952 cl.radiance = cl1.radiance + cl2.radiance; 953 # ifdef USE_SSS 954 cl.sss_data = (cl1.sss_data.a > 0.0) ? cl1.sss_data : cl2.sss_data; 955 /* Add radiance that was supposed to be filtered but was rejected. */ 956 cl.radiance += (cl1.sss_data.a > 0.0) ? cl2.sss_data.rgb : cl1.sss_data.rgb; 957 # ifdef USE_SSS_ALBEDO 958 /* TODO Find a solution to this. Dither? */ 959 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 960 # endif 961 # endif 962 cl.opacity = saturate(cl1.opacity + cl2.opacity); 963 return cl; 964 } 965 966 Closure closure_emission(vec3 rgb) 967 { 968 Closure cl = CLOSURE_DEFAULT; 969 cl.radiance = rgb; 970 return cl; 971 } 972 973 # if defined(MESH_SHADER) && !defined(USE_ALPHA_HASH) && !defined(USE_ALPHA_CLIP) && \ 974 !defined(SHADOW_SHADER) && !defined(USE_MULTIPLY) 975 layout(location = 0) out vec4 fragColor; 976 layout(location = 1) out vec4 ssrNormals; 977 layout(location = 2) out vec4 ssrData; 978 # ifdef USE_SSS 979 layout(location = 3) out vec4 sssData; 980 # ifdef USE_SSS_ALBEDO 981 layout(location = 4) out vec4 sssAlbedo; 982 # endif /* USE_SSS_ALBEDO */ 983 # endif /* USE_SSS */ 984 985 Closure nodetree_exec(void); /* Prototype */ 986 987 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 988 /* Prototype because this file is included before volumetric_lib.glsl */ 989 vec4 volumetric_resolve(vec4 scene_color, vec2 frag_uvs, float frag_depth); 990 # endif 991 992 # define NODETREE_EXEC 993 void main() 994 { 995 Closure cl = nodetree_exec(); 996 # ifndef USE_ALPHA_BLEND 997 /* Prevent alpha hash material writing into alpha channel. */ 998 cl.opacity = 1.0; 999 # endif 1000 1001 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 1002 /* XXX fragile, better use real viewport resolution */ 1003 vec2 uvs = gl_FragCoord.xy / vec2(2 * textureSize(maxzBuffer, 0).xy); 1004 fragColor.rgb = volumetric_resolve(vec4(cl.radiance, cl.opacity), uvs, gl_FragCoord.z).rgb; 1005 fragColor.a = cl.opacity; 1006 # else 1007 fragColor = vec4(cl.radiance, cl.opacity); 1008 # endif 1009 1010 ssrNormals = cl.ssr_normal.xyyy; 1011 ssrData = cl.ssr_data; 1012 # ifdef USE_SSS 1013 sssData = cl.sss_data; 1014 # ifdef USE_SSS_ALBEDO 1015 sssAlbedo = cl.sss_albedo.rgbb; 1016 # endif 1017 # endif 1018 1019 /* For Probe capture */ 1020 # ifdef USE_SSS 1021 # ifdef USE_SSS_ALBEDO 1022 fragColor.rgb += cl.sss_data.rgb * cl.sss_albedo.rgb * float(!sssToggle); 1023 # else 1024 fragColor.rgb += cl.sss_data.rgb * float(!sssToggle); 1025 # endif 1026 # endif 1027 } 1028 1029 # endif /* MESH_SHADER && !SHADOW_SHADER */ 1030 1031 #endif /* VOLUMETRICS */ 1032 1033 Closure nodetree_exec(void); /* Prototype */ 1034 1035 /* TODO find a better place */ 1036 #ifdef USE_MULTIPLY 1037 1038 out vec4 fragColor; 1039 1040 # define NODETREE_EXEC 1041 void main() 1042 { 1043 Closure cl = nodetree_exec(); 1044 fragColor = vec4(mix(vec3(1.0), cl.radiance, cl.opacity), 1.0); 1045 } 1046 #endif 1047 1048 uniform sampler1D texHammersley; 1049 uniform sampler2D texJitter; 1050 uniform float sampleCount; 1051 uniform float invSampleCount; 1052 1053 vec2 jitternoise = vec2(0.0); 1054 1055 #ifndef UTIL_TEX 1056 # define UTIL_TEX 1057 uniform sampler2DArray utilTex; 1058 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 1059 #endif /* UTIL_TEX */ 1060 1061 void setup_noise(void) 1062 { 1063 jitternoise = texelfetch_noise_tex(gl_FragCoord.xy).rg; /* Global variable */ 1064 } 1065 1066 #ifdef HAMMERSLEY_SIZE 1067 vec3 hammersley_3d(float i, float invsamplenbr) 1068 { 1069 vec3 Xi; /* Theta, cos(Phi), sin(Phi) */ 1070 1071 Xi.x = i * invsamplenbr; /* i/samples */ 1072 Xi.x = fract(Xi.x + jitternoise.x); 1073 1074 int u = int(mod(i + jitternoise.y * HAMMERSLEY_SIZE, HAMMERSLEY_SIZE)); 1075 1076 Xi.yz = texelFetch(texHammersley, u, 0).rg; 1077 1078 return Xi; 1079 } 1080 1081 vec3 hammersley_3d(float i) 1082 { 1083 return hammersley_3d(i, invSampleCount); 1084 } 1085 #endif 1086 1087 /* -------------- BSDFS -------------- */ 1088 1089 float pdf_ggx_reflect(float NH, float a2) 1090 { 1091 return NH * a2 / D_ggx_opti(NH, a2); 1092 } 1093 1094 float pdf_hemisphere() 1095 { 1096 return 0.5 * M_1_PI; 1097 } 1098 1099 vec3 sample_ggx(vec3 rand, float a2) 1100 { 1101 /* Theta is the aperture angle of the cone */ 1102 float z = sqrt((1.0 - rand.x) / (1.0 + a2 * rand.x - rand.x)); /* cos theta */ 1103 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1104 float x = r * rand.y; 1105 float y = r * rand.z; 1106 1107 /* Microfacet Normal */ 1108 return vec3(x, y, z); 1109 } 1110 1111 vec3 sample_ggx(vec3 rand, float a2, vec3 N, vec3 T, vec3 B, out float NH) 1112 { 1113 vec3 Ht = sample_ggx(rand, a2); 1114 NH = Ht.z; 1115 return tangent_to_world(Ht, N, T, B); 1116 } 1117 1118 #ifdef HAMMERSLEY_SIZE 1119 vec3 sample_ggx(float nsample, float a2, vec3 N, vec3 T, vec3 B) 1120 { 1121 vec3 Xi = hammersley_3d(nsample); 1122 vec3 Ht = sample_ggx(Xi, a2); 1123 return tangent_to_world(Ht, N, T, B); 1124 } 1125 1126 vec3 sample_hemisphere(float nsample, vec3 N, vec3 T, vec3 B) 1127 { 1128 vec3 Xi = hammersley_3d(nsample); 1129 1130 float z = Xi.x; /* cos theta */ 1131 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1132 float x = r * Xi.y; 1133 float y = r * Xi.z; 1134 1135 vec3 Ht = vec3(x, y, z); 1136 1137 return tangent_to_world(Ht, N, T, B); 1138 } 1139 1140 vec3 sample_cone(float nsample, float angle, vec3 N, vec3 T, vec3 B) 1141 { 1142 vec3 Xi = hammersley_3d(nsample); 1143 1144 float z = cos(angle * Xi.x); /* cos theta */ 1145 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1146 float x = r * Xi.y; 1147 float y = r * Xi.z; 1148 1149 vec3 Ht = vec3(x, y, z); 1150 1151 return tangent_to_world(Ht, N, T, B); 1152 } 1153 #endif 1154 1155 /* Based on Practical Realtime Strategies for Accurate Indirect Occlusion 1156 * http://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pdf 1157 * http://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pptx */ 1158 1159 #if defined(MESH_SHADER) 1160 # if !defined(USE_ALPHA_HASH) 1161 # if !defined(USE_ALPHA_CLIP) 1162 # if !defined(SHADOW_SHADER) 1163 # if !defined(USE_MULTIPLY) 1164 # if !defined(USE_ALPHA_BLEND) 1165 # define ENABLE_DEFERED_AO 1166 # endif 1167 # endif 1168 # endif 1169 # endif 1170 # endif 1171 #endif 1172 1173 #ifndef ENABLE_DEFERED_AO 1174 # if defined(STEP_RESOLVE) 1175 # define ENABLE_DEFERED_AO 1176 # endif 1177 #endif 1178 1179 #define MAX_PHI_STEP 32 1180 #define MAX_SEARCH_ITER 32 1181 #define MAX_LOD 6.0 1182 1183 #ifndef UTIL_TEX 1184 # define UTIL_TEX 1185 uniform sampler2DArray utilTex; 1186 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 1187 #endif /* UTIL_TEX */ 1188 1189 uniform sampler2D horizonBuffer; 1190 1191 /* aoSettings flags */ 1192 #define USE_AO 1 1193 #define USE_BENT_NORMAL 2 1194 #define USE_DENOISE 4 1195 1196 vec4 pack_horizons(vec4 v) 1197 { 1198 return v * 0.5 + 0.5; 1199 } 1200 vec4 unpack_horizons(vec4 v) 1201 { 1202 return v * 2.0 - 1.0; 1203 } 1204 1205 /* Returns maximum screen distance an AO ray can travel for a given view depth */ 1206 vec2 get_max_dir(float view_depth) 1207 { 1208 float homcco = ProjectionMatrix[2][3] * view_depth + ProjectionMatrix[3][3]; 1209 float max_dist = aoDistance / homcco; 1210 return vec2(ProjectionMatrix[0][0], ProjectionMatrix[1][1]) * max_dist; 1211 } 1212 1213 vec2 get_ao_dir(float jitter) 1214 { 1215 /* Only half a turn because we integrate in slices. */ 1216 jitter *= M_PI; 1217 return vec2(cos(jitter), sin(jitter)); 1218 } 1219 1220 void get_max_horizon_grouped(vec4 co1, vec4 co2, vec3 x, float lod, inout float h) 1221 { 1222 int mip = int(lod) + hizMipOffset; 1223 co1 *= mipRatio[mip].xyxy; 1224 co2 *= mipRatio[mip].xyxy; 1225 1226 float depth1 = textureLod(maxzBuffer, co1.xy, floor(lod)).r; 1227 float depth2 = textureLod(maxzBuffer, co1.zw, floor(lod)).r; 1228 float depth3 = textureLod(maxzBuffer, co2.xy, floor(lod)).r; 1229 float depth4 = textureLod(maxzBuffer, co2.zw, floor(lod)).r; 1230 1231 vec4 len, s_h; 1232 1233 vec3 s1 = get_view_space_from_depth(co1.xy, depth1); /* s View coordinate */ 1234 vec3 omega_s1 = s1 - x; 1235 len.x = length(omega_s1); 1236 s_h.x = omega_s1.z / len.x; 1237 1238 vec3 s2 = get_view_space_from_depth(co1.zw, depth2); /* s View coordinate */ 1239 vec3 omega_s2 = s2 - x; 1240 len.y = length(omega_s2); 1241 s_h.y = omega_s2.z / len.y; 1242 1243 vec3 s3 = get_view_space_from_depth(co2.xy, depth3); /* s View coordinate */ 1244 vec3 omega_s3 = s3 - x; 1245 len.z = length(omega_s3); 1246 s_h.z = omega_s3.z / len.z; 1247 1248 vec3 s4 = get_view_space_from_depth(co2.zw, depth4); /* s View coordinate */ 1249 vec3 omega_s4 = s4 - x; 1250 len.w = length(omega_s4); 1251 s_h.w = omega_s4.z / len.w; 1252 1253 /* Blend weight after half the aoDistance to fade artifacts */ 1254 vec4 blend = saturate((1.0 - len / aoDistance) * 2.0); 1255 1256 h = mix(h, max(h, s_h.x), blend.x); 1257 h = mix(h, max(h, s_h.y), blend.y); 1258 h = mix(h, max(h, s_h.z), blend.z); 1259 h = mix(h, max(h, s_h.w), blend.w); 1260 } 1261 1262 vec2 search_horizon_sweep(vec2 t_phi, vec3 pos, vec2 uvs, float jitter, vec2 max_dir) 1263 { 1264 max_dir *= max_v2(abs(t_phi)); 1265 1266 /* Convert to pixel space. */ 1267 t_phi /= vec2(textureSize(maxzBuffer, 0)); 1268 1269 /* Avoid division by 0 */ 1270 t_phi += vec2(1e-5); 1271 1272 jitter *= 0.25; 1273 1274 /* Compute end points */ 1275 vec2 corner1 = min(vec2(1.0) - uvs, max_dir); /* Top right */ 1276 vec2 corner2 = max(vec2(0.0) - uvs, -max_dir); /* Bottom left */ 1277 vec2 iter1 = corner1 / t_phi; 1278 vec2 iter2 = corner2 / t_phi; 1279 1280 vec2 min_iter = max(-iter1, -iter2); 1281 vec2 max_iter = max(iter1, iter2); 1282 1283 vec2 times = vec2(-min_v2(min_iter), min_v2(max_iter)); 1284 1285 vec2 h = vec2(-1.0); /* init at cos(pi) */ 1286 1287 /* This is freaking sexy optimized. */ 1288 for (float i = 0.0, ofs = 4.0, time = -1.0; i < MAX_SEARCH_ITER && time > times.x; 1289 i++, time -= ofs, ofs = min(exp2(MAX_LOD) * 4.0, ofs + ofs * aoQuality)) { 1290 vec4 t = max(times.xxxx, vec4(time) - (vec4(0.25, 0.5, 0.75, 1.0) - jitter) * ofs); 1291 vec4 cos1 = uvs.xyxy + t_phi.xyxy * t.xxyy; 1292 vec4 cos2 = uvs.xyxy + t_phi.xyxy * t.zzww; 1293 float lod = min(MAX_LOD, max(i - jitter * 4.0, 0.0) * aoQuality); 1294 get_max_horizon_grouped(cos1, cos2, pos, lod, h.y); 1295 } 1296 1297 for (float i = 0.0, ofs = 4.0, time = 1.0; i < MAX_SEARCH_ITER && time < times.y; 1298 i++, time += ofs, ofs = min(exp2(MAX_LOD) * 4.0, ofs + ofs * aoQuality)) { 1299 vec4 t = min(times.yyyy, vec4(time) + (vec4(0.25, 0.5, 0.75, 1.0) - jitter) * ofs); 1300 vec4 cos1 = uvs.xyxy + t_phi.xyxy * t.xxyy; 1301 vec4 cos2 = uvs.xyxy + t_phi.xyxy * t.zzww; 1302 float lod = min(MAX_LOD, max(i - jitter * 4.0, 0.0) * aoQuality); 1303 get_max_horizon_grouped(cos1, cos2, pos, lod, h.x); 1304 } 1305 1306 return h; 1307 } 1308 1309 void integrate_slice( 1310 vec3 normal, vec2 t_phi, vec2 horizons, inout float visibility, inout vec3 bent_normal) 1311 { 1312 /* Projecting Normal to Plane P defined by t_phi and omega_o */ 1313 vec3 np = vec3(t_phi.y, -t_phi.x, 0.0); /* Normal vector to Integration plane */ 1314 vec3 t = vec3(-t_phi, 0.0); 1315 vec3 n_proj = normal - np * dot(np, normal); 1316 float n_proj_len = max(1e-16, length(n_proj)); 1317 1318 float cos_n = clamp(n_proj.z / n_proj_len, -1.0, 1.0); 1319 float n = sign(dot(n_proj, t)) * fast_acos(cos_n); /* Angle between view vec and normal */ 1320 1321 /* (Slide 54) */ 1322 vec2 h = fast_acos(horizons); 1323 h.x = -h.x; 1324 1325 /* Clamping thetas (slide 58) */ 1326 h.x = n + max(h.x - n, -M_PI_2); 1327 h.y = n + min(h.y - n, M_PI_2); 1328 1329 /* Solving inner integral */ 1330 vec2 h_2 = 2.0 * h; 1331 vec2 vd = -cos(h_2 - n) + cos_n + h_2 * sin(n); 1332 float vis = (vd.x + vd.y) * 0.25 * n_proj_len; 1333 1334 visibility += vis; 1335 1336 /* O. Klehm, T. Ritschel, E. Eisemann, H.-P. Seidel 1337 * Bent Normals and Cones in Screen-space 1338 * Sec. 3.1 : Bent normals */ 1339 float b_angle = (h.x + h.y) * 0.5; 1340 bent_normal += vec3(sin(b_angle) * -t_phi, cos(b_angle)) * vis; 1341 } 1342 1343 void gtao_deferred( 1344 vec3 normal, vec4 noise, float frag_depth, out float visibility, out vec3 bent_normal) 1345 { 1346 /* Fetch early, hide latency! */ 1347 vec4 horizons = texelFetch(horizonBuffer, ivec2(gl_FragCoord.xy), 0); 1348 1349 vec4 dirs; 1350 dirs.xy = get_ao_dir(noise.x * 0.5); 1351 dirs.zw = get_ao_dir(noise.x * 0.5 + 0.5); 1352 1353 bent_normal = vec3(0.0); 1354 visibility = 0.0; 1355 1356 horizons = unpack_horizons(horizons); 1357 1358 integrate_slice(normal, dirs.xy, horizons.xy, visibility, bent_normal); 1359 integrate_slice(normal, dirs.zw, horizons.zw, visibility, bent_normal); 1360 1361 bent_normal = normalize(bent_normal / visibility); 1362 1363 visibility *= 0.5; /* We integrated 2 slices. */ 1364 } 1365 1366 void gtao(vec3 normal, vec3 position, vec4 noise, out float visibility, out vec3 bent_normal) 1367 { 1368 vec2 uvs = get_uvs_from_view(position); 1369 vec2 max_dir = get_max_dir(position.z); 1370 vec2 dir = get_ao_dir(noise.x); 1371 1372 bent_normal = vec3(0.0); 1373 visibility = 0.0; 1374 1375 /* Only trace in 2 directions. May lead to a darker result but since it's mostly for 1376 * alpha blended objects that will have overdraw, we limit the performance impact. */ 1377 vec2 horizons = search_horizon_sweep(dir, position, uvs, noise.y, max_dir); 1378 integrate_slice(normal, dir, horizons, visibility, bent_normal); 1379 1380 bent_normal = normalize(bent_normal / visibility); 1381 } 1382 1383 /* Multibounce approximation base on surface albedo. 1384 * Page 78 in the .pdf version. */ 1385 float gtao_multibounce(float visibility, vec3 albedo) 1386 { 1387 if (aoBounceFac == 0.0) 1388 return visibility; 1389 1390 /* Median luminance. Because Colored multibounce looks bad. */ 1391 float lum = dot(albedo, vec3(0.3333)); 1392 1393 float a = 2.0404 * lum - 0.3324; 1394 float b = -4.7951 * lum + 0.6417; 1395 float c = 2.7552 * lum + 0.6903; 1396 1397 float x = visibility; 1398 return max(x, ((x * a + b) * x + c) * x); 1399 } 1400 1401 /* Use the right occlusion */ 1402 float occlusion_compute(vec3 N, vec3 vpos, float user_occlusion, vec4 rand, out vec3 bent_normal) 1403 { 1404 #ifndef USE_REFRACTION 1405 if ((int(aoSettings) & USE_AO) != 0) { 1406 float visibility; 1407 vec3 vnor = mat3(ViewMatrix) * N; 1408 1409 # ifdef ENABLE_DEFERED_AO 1410 gtao_deferred(vnor, rand, gl_FragCoord.z, visibility, bent_normal); 1411 # else 1412 gtao(vnor, vpos, rand, visibility, bent_normal); 1413 # endif 1414 1415 /* Prevent some problems down the road. */ 1416 visibility = max(1e-3, visibility); 1417 1418 if ((int(aoSettings) & USE_BENT_NORMAL) != 0) { 1419 /* The bent normal will show the facet look of the mesh. Try to minimize this. */ 1420 float mix_fac = visibility * visibility * visibility; 1421 bent_normal = normalize(mix(bent_normal, vnor, mix_fac)); 1422 1423 bent_normal = transform_direction(ViewMatrixInverse, bent_normal); 1424 } 1425 else { 1426 bent_normal = N; 1427 } 1428 1429 /* Scale by user factor */ 1430 visibility = pow(visibility, aoFactor); 1431 1432 return min(visibility, user_occlusion); 1433 } 1434 #endif 1435 1436 bent_normal = N; 1437 return user_occlusion; 1438 } 1439 #define MAX_STEP 256 1440 1441 float sample_depth(vec2 uv, int index, float lod) 1442 { 1443 #ifdef PLANAR_PROBE_RAYTRACE 1444 if (index > -1) { 1445 return textureLod(planarDepth, vec3(uv, index), 0.0).r; 1446 } 1447 else { 1448 #endif 1449 /* Correct UVs for mipmaping mis-alignment */ 1450 uv *= mipRatio[int(lod) + hizMipOffset]; 1451 return textureLod(maxzBuffer, uv, lod).r; 1452 #ifdef PLANAR_PROBE_RAYTRACE 1453 } 1454 #endif 1455 } 1456 1457 vec4 sample_depth_grouped(vec4 uv1, vec4 uv2, int index, float lod) 1458 { 1459 vec4 depths; 1460 #ifdef PLANAR_PROBE_RAYTRACE 1461 if (index > -1) { 1462 depths.x = textureLod(planarDepth, vec3(uv1.xy, index), 0.0).r; 1463 depths.y = textureLod(planarDepth, vec3(uv1.zw, index), 0.0).r; 1464 depths.z = textureLod(planarDepth, vec3(uv2.xy, index), 0.0).r; 1465 depths.w = textureLod(planarDepth, vec3(uv2.zw, index), 0.0).r; 1466 } 1467 else { 1468 #endif 1469 depths.x = textureLod(maxzBuffer, uv1.xy, lod).r; 1470 depths.y = textureLod(maxzBuffer, uv1.zw, lod).r; 1471 depths.z = textureLod(maxzBuffer, uv2.xy, lod).r; 1472 depths.w = textureLod(maxzBuffer, uv2.zw, lod).r; 1473 #ifdef PLANAR_PROBE_RAYTRACE 1474 } 1475 #endif 1476 return depths; 1477 } 1478 1479 float refine_isect(float prev_delta, float curr_delta) 1480 { 1481 /** 1482 * Simplification of 2D intersection : 1483 * r0 = (0.0, prev_ss_ray.z); 1484 * r1 = (1.0, curr_ss_ray.z); 1485 * d0 = (0.0, prev_hit_depth_sample); 1486 * d1 = (1.0, curr_hit_depth_sample); 1487 * vec2 r = r1 - r0; 1488 * vec2 d = d1 - d0; 1489 * vec2 isect = ((d * cross(r1, r0)) - (r * cross(d1, d0))) / cross(r,d); 1490 * 1491 * We only want isect.x to know how much stride we need. So it simplifies : 1492 * 1493 * isect_x = (cross(r1, r0) - cross(d1, d0)) / cross(r,d); 1494 * isect_x = (prev_ss_ray.z - prev_hit_depth_sample.z) / cross(r,d); 1495 */ 1496 return saturate(prev_delta / (prev_delta - curr_delta)); 1497 } 1498 1499 void prepare_raycast(vec3 ray_origin, 1500 vec3 ray_dir, 1501 float thickness, 1502 int index, 1503 out vec4 ss_step, 1504 out vec4 ss_ray, 1505 out float max_time) 1506 { 1507 /* Negate the ray direction if it goes towards the camera. 1508 * This way we don't need to care if the projected point 1509 * is behind the near plane. */ 1510 float z_sign = -sign(ray_dir.z); 1511 vec3 ray_end = ray_origin + z_sign * ray_dir; 1512 1513 /* Project into screen space. */ 1514 vec4 ss_start, ss_end; 1515 ss_start.xyz = project_point(ProjectionMatrix, ray_origin); 1516 ss_end.xyz = project_point(ProjectionMatrix, ray_end); 1517 1518 /* We interpolate the ray Z + thickness values to check if depth is within threshold. */ 1519 ray_origin.z -= thickness; 1520 ray_end.z -= thickness; 1521 ss_start.w = project_point(ProjectionMatrix, ray_origin).z; 1522 ss_end.w = project_point(ProjectionMatrix, ray_end).z; 1523 1524 /* XXX This is a hack a better method is welcome ! */ 1525 /* We take the delta between the offseted depth and the depth and substract it from the ray depth. 1526 * This will change the world space thickness appearance a bit but we can have negative 1527 * values without worries. We cannot do this in viewspace because of the perspective division. */ 1528 ss_start.w = 2.0 * ss_start.z - ss_start.w; 1529 ss_end.w = 2.0 * ss_end.z - ss_end.w; 1530 1531 ss_step = ss_end - ss_start; 1532 max_time = length(ss_step.xyz); 1533 ss_step = z_sign * ss_step / length(ss_step.xyz); 1534 1535 /* If the line is degenerate, make it cover at least one pixel 1536 * to not have to handle zero-pixel extent as a special case later */ 1537 ss_step.xy += vec2((dot(ss_step.xy, ss_step.xy) < 0.00001) ? 0.001 : 0.0); 1538 1539 /* Make ss_step cover one pixel. */ 1540 ss_step /= max(abs(ss_step.x), abs(ss_step.y)); 1541 ss_step *= (abs(ss_step.x) > abs(ss_step.y)) ? ssrPixelSize.x : ssrPixelSize.y; 1542 1543 /* Clip to segment's end. */ 1544 max_time /= length(ss_step.xyz); 1545 1546 /* Clipping to frustum sides. */ 1547 max_time = min(max_time, line_unit_box_intersect_dist(ss_start.xyz, ss_step.xyz)); 1548 1549 /* Convert to texture coords. Z component included 1550 * since this is how it's stored in the depth buffer. 1551 * 4th component how far we are on the ray */ 1552 #ifdef PLANAR_PROBE_RAYTRACE 1553 /* Planar Reflections have X mirrored. */ 1554 vec2 m = (index > -1) ? vec2(-0.5, 0.5) : vec2(0.5); 1555 #else 1556 const vec2 m = vec2(0.5); 1557 #endif 1558 ss_ray = ss_start * m.xyyy + 0.5; 1559 ss_step *= m.xyyy; 1560 1561 ss_ray.xy += m * ssrPixelSize * 2.0; /* take the center of the texel. * 2 because halfres. */ 1562 } 1563 1564 /* See times_and_deltas. */ 1565 #define curr_time times_and_deltas.x 1566 #define prev_time times_and_deltas.y 1567 #define curr_delta times_and_deltas.z 1568 #define prev_delta times_and_deltas.w 1569 1570 // #define GROUPED_FETCHES /* is still slower, need to see where is the bottleneck. */ 1571 /* Return the hit position, and negate the z component (making it positive) if not hit occurred. */ 1572 /* __ray_dir__ is the ray direction premultiplied by it's maximum length */ 1573 vec3 raycast(int index, 1574 vec3 ray_origin, 1575 vec3 ray_dir, 1576 float thickness, 1577 float ray_jitter, 1578 float trace_quality, 1579 float roughness, 1580 const bool discard_backface) 1581 { 1582 vec4 ss_step, ss_start; 1583 float max_time; 1584 prepare_raycast(ray_origin, ray_dir, thickness, index, ss_step, ss_start, max_time); 1585 1586 float max_trace_time = max(0.01, max_time - 0.01); 1587 1588 #ifdef GROUPED_FETCHES 1589 ray_jitter *= 0.25; 1590 #endif 1591 1592 /* x : current_time, y: previous_time, z: current_delta, w: previous_delta */ 1593 vec4 times_and_deltas = vec4(0.0); 1594 1595 float ray_time = 0.0; 1596 float depth_sample = sample_depth(ss_start.xy, index, 0.0); 1597 curr_delta = depth_sample - ss_start.z; 1598 1599 float lod_fac = saturate(fast_sqrt(roughness) * 2.0 - 0.4); 1600 bool hit = false; 1601 float iter; 1602 for (iter = 1.0; !hit && (ray_time < max_time) && (iter < MAX_STEP); iter++) { 1603 /* Minimum stride of 2 because we are using half res minmax zbuffer. */ 1604 float stride = max(1.0, iter * trace_quality) * 2.0; 1605 float lod = log2(stride * 0.5 * trace_quality) * lod_fac; 1606 ray_time += stride; 1607 1608 /* Save previous values. */ 1609 times_and_deltas.xyzw = times_and_deltas.yxwz; 1610 1611 #ifdef GROUPED_FETCHES 1612 stride *= 4.0; 1613 vec4 jit_stride = mix(vec4(2.0), vec4(stride), vec4(0.0, 0.25, 0.5, 0.75) + ray_jitter); 1614 1615 vec4 times = min(vec4(ray_time) + jit_stride, vec4(max_trace_time)); 1616 1617 vec4 uv1 = ss_start.xyxy + ss_step.xyxy * times.xxyy; 1618 vec4 uv2 = ss_start.xyxy + ss_step.xyxy * times.zzww; 1619 1620 vec4 depth_samples = sample_depth_grouped(uv1, uv2, index, lod); 1621 1622 vec4 ray_z = ss_start.zzzz + ss_step.zzzz * times.xyzw; 1623 vec4 ray_w = ss_start.wwww + ss_step.wwww * vec4(prev_time, times.xyz); 1624 1625 vec4 deltas = depth_samples - ray_z; 1626 /* Same as component wise (curr_delta <= 0.0) && (prev_w <= depth_sample). */ 1627 bvec4 test = equal(step(deltas, vec4(0.0)) * step(ray_w, depth_samples), vec4(1.0)); 1628 hit = any(test); 1629 1630 if (hit) { 1631 vec2 m = vec2(1.0, 0.0); /* Mask */ 1632 1633 vec4 ret_times_and_deltas = times.wzzz * m.xxyy + deltas.wwwz * m.yyxx; 1634 ret_times_and_deltas = (test.z) ? times.zyyy * m.xxyy + deltas.zzzy * m.yyxx : 1635 ret_times_and_deltas; 1636 ret_times_and_deltas = (test.y) ? times.yxxx * m.xxyy + deltas.yyyx * m.yyxx : 1637 ret_times_and_deltas; 1638 times_and_deltas = (test.x) ? times.xxxx * m.xyyy + deltas.xxxx * m.yyxy + 1639 times_and_deltas.yyww * m.yxyx : 1640 ret_times_and_deltas; 1641 1642 depth_sample = depth_samples.w; 1643 depth_sample = (test.z) ? depth_samples.z : depth_sample; 1644 depth_sample = (test.y) ? depth_samples.y : depth_sample; 1645 depth_sample = (test.x) ? depth_samples.x : depth_sample; 1646 } 1647 else { 1648 curr_time = times.w; 1649 curr_delta = deltas.w; 1650 } 1651 #else 1652 float jit_stride = mix(2.0, stride, ray_jitter); 1653 1654 curr_time = min(ray_time + jit_stride, max_trace_time); 1655 vec4 ss_ray = ss_start + ss_step * curr_time; 1656 1657 depth_sample = sample_depth(ss_ray.xy, index, lod); 1658 1659 float prev_w = ss_start.w + ss_step.w * prev_time; 1660 curr_delta = depth_sample - ss_ray.z; 1661 hit = (curr_delta <= 0.0) && (prev_w <= depth_sample); 1662 #endif 1663 } 1664 1665 if (discard_backface) { 1666 /* Discard backface hits */ 1667 hit = hit && (prev_delta > 0.0); 1668 } 1669 1670 /* Reject hit if background. */ 1671 hit = hit && (depth_sample != 1.0); 1672 1673 curr_time = (hit) ? mix(prev_time, curr_time, refine_isect(prev_delta, curr_delta)) : curr_time; 1674 ray_time = (hit) ? curr_time : ray_time; 1675 1676 /* Clip to frustum. */ 1677 ray_time = max(0.001, min(ray_time, max_time - 1.5)); 1678 1679 vec4 ss_ray = ss_start + ss_step * ray_time; 1680 1681 /* Tag Z if ray failed. */ 1682 ss_ray.z *= (hit) ? 1.0 : -1.0; 1683 return ss_ray.xyz; 1684 } 1685 1686 float screen_border_mask(vec2 hit_co) 1687 { 1688 const float margin = 0.003; 1689 float atten = ssrBorderFac + margin; /* Screen percentage */ 1690 hit_co = smoothstep(margin, atten, hit_co) * (1 - smoothstep(1.0 - atten, 1.0 - margin, hit_co)); 1691 1692 float screenfade = hit_co.x * hit_co.y; 1693 1694 return screenfade; 1695 } 1696 /* ------------ Refraction ------------ */ 1697 1698 #define BTDF_BIAS 0.85 1699 1700 vec4 screen_space_refraction( 1701 vec3 viewPosition, vec3 N, vec3 V, float ior, float roughnessSquared, vec4 rand) 1702 { 1703 float a2 = max(5e-6, roughnessSquared * roughnessSquared); 1704 1705 /* Importance sampling bias */ 1706 rand.x = mix(rand.x, 0.0, BTDF_BIAS); 1707 1708 vec3 T, B; 1709 float NH; 1710 make_orthonormal_basis(N, T, B); 1711 vec3 H = sample_ggx(rand.xzw, a2, N, T, B, NH); /* Microfacet normal */ 1712 float pdf = pdf_ggx_reflect(NH, a2); 1713 1714 /* If ray is bad (i.e. going below the plane) regenerate. */ 1715 if (F_eta(ior, dot(H, V)) < 1.0) { 1716 H = sample_ggx(rand.xzw * vec3(1.0, -1.0, -1.0), a2, N, T, B, NH); /* Microfacet normal */ 1717 pdf = pdf_ggx_reflect(NH, a2); 1718 } 1719 1720 vec3 vV = viewCameraVec; 1721 float eta = 1.0 / ior; 1722 if (dot(H, V) < 0.0) { 1723 H = -H; 1724 eta = ior; 1725 } 1726 1727 vec3 R = refract(-V, H, 1.0 / ior); 1728 1729 R = transform_direction(ViewMatrix, R); 1730 1731 vec3 hit_pos = raycast( 1732 -1, viewPosition, R * 1e16, ssrThickness, rand.y, ssrQuality, roughnessSquared, false); 1733 1734 if ((hit_pos.z > 0.0) && (F_eta(ior, dot(H, V)) < 1.0)) { 1735 hit_pos = get_view_space_from_depth(hit_pos.xy, hit_pos.z); 1736 float hit_dist = distance(hit_pos, viewPosition); 1737 1738 float cone_cos = cone_cosine(roughnessSquared); 1739 float cone_tan = sqrt(1 - cone_cos * cone_cos) / cone_cos; 1740 1741 /* Empirical fit for refraction. */ 1742 /* TODO find a better fit or precompute inside the LUT. */ 1743 cone_tan *= 0.5 * fast_sqrt(f0_from_ior((ior < 1.0) ? 1.0 / ior : ior)); 1744 1745 float cone_footprint = hit_dist * cone_tan; 1746 1747 /* find the offset in screen space by multiplying a point 1748 * in camera space at the depth of the point by the projection matrix. */ 1749 float homcoord = ProjectionMatrix[2][3] * hit_pos.z + ProjectionMatrix[3][3]; 1750 /* UV space footprint */ 1751 cone_footprint = BTDF_BIAS * 0.5 * max(ProjectionMatrix[0][0], ProjectionMatrix[1][1]) * 1752 cone_footprint / homcoord; 1753 1754 vec2 hit_uvs = project_point(ProjectionMatrix, hit_pos).xy * 0.5 + 0.5; 1755 1756 /* Texel footprint */ 1757 vec2 texture_size = vec2(textureSize(colorBuffer, 0).xy); 1758 float mip = clamp(log2(cone_footprint * max(texture_size.x, texture_size.y)), 0.0, 9.0); 1759 1760 /* Correct UVs for mipmaping mis-alignment */ 1761 hit_uvs *= mip_ratio_interp(mip); 1762 1763 vec3 spec = textureLod(colorBuffer, hit_uvs, mip).xyz; 1764 float mask = screen_border_mask(hit_uvs); 1765 1766 return vec4(spec, mask); 1767 } 1768 1769 return vec4(0.0); 1770 } 1771 1772 vec2 mapping_octahedron(vec3 cubevec, vec2 texel_size) 1773 { 1774 /* projection onto octahedron */ 1775 cubevec /= dot(vec3(1.0), abs(cubevec)); 1776 1777 /* out-folding of the downward faces */ 1778 if (cubevec.z < 0.0) { 1779 vec2 cubevec_sign = step(0.0, cubevec.xy) * 2.0 - 1.0; 1780 cubevec.xy = (1.0 - abs(cubevec.yx)) * cubevec_sign; 1781 } 1782 1783 /* mapping to [0;1]ˆ2 texture space */ 1784 vec2 uvs = cubevec.xy * (0.5) + 0.5; 1785 1786 /* edge filtering fix */ 1787 uvs = (1.0 - 2.0 * texel_size) * uvs + texel_size; 1788 1789 return uvs; 1790 } 1791 1792 vec4 textureLod_octahedron(sampler2DArray tex, vec4 cubevec, float lod, float lod_max) 1793 { 1794 vec2 texelSize = 1.0 / vec2(textureSize(tex, int(lod_max))); 1795 1796 vec2 uvs = mapping_octahedron(cubevec.xyz, texelSize); 1797 1798 return textureLod(tex, vec3(uvs, cubevec.w), lod); 1799 } 1800 1801 vec4 texture_octahedron(sampler2DArray tex, vec4 cubevec) 1802 { 1803 vec2 texelSize = 1.0 / vec2(textureSize(tex, 0)); 1804 1805 vec2 uvs = mapping_octahedron(cubevec.xyz, texelSize); 1806 1807 return texture(tex, vec3(uvs, cubevec.w)); 1808 } 1809 1810 uniform sampler2DArray irradianceGrid; 1811 1812 #define IRRADIANCE_LIB 1813 1814 #ifdef IRRADIANCE_CUBEMAP 1815 struct IrradianceData { 1816 vec3 color; 1817 }; 1818 #elif defined(IRRADIANCE_SH_L2) 1819 struct IrradianceData { 1820 vec3 shcoefs[9]; 1821 }; 1822 #else /* defined(IRRADIANCE_HL2) */ 1823 struct IrradianceData { 1824 vec3 cubesides[3]; 1825 }; 1826 #endif 1827 1828 IrradianceData load_irradiance_cell(int cell, vec3 N) 1829 { 1830 /* Keep in sync with diffuse_filter_probe() */ 1831 1832 #if defined(IRRADIANCE_CUBEMAP) 1833 1834 # define AMBIANT_CUBESIZE 8 1835 ivec2 cell_co = ivec2(AMBIANT_CUBESIZE); 1836 int cell_per_row = textureSize(irradianceGrid, 0).x / cell_co.x; 1837 cell_co.x *= cell % cell_per_row; 1838 cell_co.y *= cell / cell_per_row; 1839 1840 vec2 texelSize = 1.0 / vec2(AMBIANT_CUBESIZE); 1841 1842 vec2 uvs = mapping_octahedron(N, texelSize); 1843 uvs *= vec2(AMBIANT_CUBESIZE) / vec2(textureSize(irradianceGrid, 0)); 1844 uvs += vec2(cell_co) / vec2(textureSize(irradianceGrid, 0)); 1845 1846 IrradianceData ir; 1847 ir.color = texture(irradianceGrid, vec3(uvs, 0.0)).rgb; 1848 1849 #elif defined(IRRADIANCE_SH_L2) 1850 1851 ivec2 cell_co = ivec2(3, 3); 1852 int cell_per_row = textureSize(irradianceGrid, 0).x / cell_co.x; 1853 cell_co.x *= cell % cell_per_row; 1854 cell_co.y *= cell / cell_per_row; 1855 1856 ivec3 ofs = ivec3(0, 1, 2); 1857 1858 IrradianceData ir; 1859 ir.shcoefs[0] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.xx, 0), 0).rgb; 1860 ir.shcoefs[1] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.yx, 0), 0).rgb; 1861 ir.shcoefs[2] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.zx, 0), 0).rgb; 1862 ir.shcoefs[3] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.xy, 0), 0).rgb; 1863 ir.shcoefs[4] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.yy, 0), 0).rgb; 1864 ir.shcoefs[5] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.zy, 0), 0).rgb; 1865 ir.shcoefs[6] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.xz, 0), 0).rgb; 1866 ir.shcoefs[7] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.yz, 0), 0).rgb; 1867 ir.shcoefs[8] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.zz, 0), 0).rgb; 1868 1869 #else /* defined(IRRADIANCE_HL2) */ 1870 1871 ivec2 cell_co = ivec2(3, 2); 1872 int cell_per_row = textureSize(irradianceGrid, 0).x / cell_co.x; 1873 cell_co.x *= cell % cell_per_row; 1874 cell_co.y *= cell / cell_per_row; 1875 1876 ivec3 is_negative = ivec3(step(0.0, -N)); 1877 1878 IrradianceData ir; 1879 ir.cubesides[0] = irradiance_decode( 1880 texelFetch(irradianceGrid, ivec3(cell_co + ivec2(0, is_negative.x), 0), 0)); 1881 ir.cubesides[1] = irradiance_decode( 1882 texelFetch(irradianceGrid, ivec3(cell_co + ivec2(1, is_negative.y), 0), 0)); 1883 ir.cubesides[2] = irradiance_decode( 1884 texelFetch(irradianceGrid, ivec3(cell_co + ivec2(2, is_negative.z), 0), 0)); 1885 1886 #endif 1887 1888 return ir; 1889 } 1890 1891 float load_visibility_cell(int cell, vec3 L, float dist, float bias, float bleed_bias, float range) 1892 { 1893 /* Keep in sync with diffuse_filter_probe() */ 1894 ivec2 cell_co = ivec2(prbIrradianceVisSize); 1895 ivec2 cell_per_row_col = textureSize(irradianceGrid, 0).xy / prbIrradianceVisSize; 1896 cell_co.x *= (cell % cell_per_row_col.x); 1897 cell_co.y *= (cell / cell_per_row_col.x) % cell_per_row_col.y; 1898 float layer = 1.0 + float((cell / cell_per_row_col.x) / cell_per_row_col.y); 1899 1900 vec2 texel_size = 1.0 / vec2(textureSize(irradianceGrid, 0).xy); 1901 vec2 co = vec2(cell_co) * texel_size; 1902 1903 vec2 uv = mapping_octahedron(-L, vec2(1.0 / float(prbIrradianceVisSize))); 1904 uv *= vec2(prbIrradianceVisSize) * texel_size; 1905 1906 vec4 data = texture(irradianceGrid, vec3(co + uv, layer)); 1907 1908 /* Decoding compressed data */ 1909 vec2 moments = visibility_decode(data, range); 1910 1911 /* Doing chebishev test */ 1912 float variance = abs(moments.x * moments.x - moments.y); 1913 variance = max(variance, bias / 10.0); 1914 1915 float d = dist - moments.x; 1916 float p_max = variance / (variance + d * d); 1917 1918 /* Increase contrast in the weight by squaring it */ 1919 p_max *= p_max; 1920 1921 /* Now reduce light-bleeding by removing the [0, x] tail and linearly rescaling (x, 1] */ 1922 p_max = clamp((p_max - bleed_bias) / (1.0 - bleed_bias), 0.0, 1.0); 1923 1924 return (dist <= moments.x) ? 1.0 : p_max; 1925 } 1926 1927 /* http://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/ */ 1928 vec3 spherical_harmonics_L1(vec3 N, vec3 shcoefs[4]) 1929 { 1930 vec3 sh = vec3(0.0); 1931 1932 sh += 0.282095 * shcoefs[0]; 1933 1934 sh += -0.488603 * N.z * shcoefs[1]; 1935 sh += 0.488603 * N.y * shcoefs[2]; 1936 sh += -0.488603 * N.x * shcoefs[3]; 1937 1938 return sh; 1939 } 1940 1941 vec3 spherical_harmonics_L2(vec3 N, vec3 shcoefs[9]) 1942 { 1943 vec3 sh = vec3(0.0); 1944 1945 sh += 0.282095 * shcoefs[0]; 1946 1947 sh += -0.488603 * N.z * shcoefs[1]; 1948 sh += 0.488603 * N.y * shcoefs[2]; 1949 sh += -0.488603 * N.x * shcoefs[3]; 1950 1951 sh += 1.092548 * N.x * N.z * shcoefs[4]; 1952 sh += -1.092548 * N.z * N.y * shcoefs[5]; 1953 sh += 0.315392 * (3.0 * N.y * N.y - 1.0) * shcoefs[6]; 1954 sh += -1.092548 * N.x * N.y * shcoefs[7]; 1955 sh += 0.546274 * (N.x * N.x - N.z * N.z) * shcoefs[8]; 1956 1957 return sh; 1958 } 1959 1960 vec3 hl2_basis(vec3 N, vec3 cubesides[3]) 1961 { 1962 vec3 irradiance = vec3(0.0); 1963 1964 vec3 n_squared = N * N; 1965 1966 irradiance += n_squared.x * cubesides[0]; 1967 irradiance += n_squared.y * cubesides[1]; 1968 irradiance += n_squared.z * cubesides[2]; 1969 1970 return irradiance; 1971 } 1972 1973 vec3 compute_irradiance(vec3 N, IrradianceData ird) 1974 { 1975 #if defined(IRRADIANCE_CUBEMAP) 1976 return ird.color; 1977 #elif defined(IRRADIANCE_SH_L2) 1978 return spherical_harmonics_L2(N, ird.shcoefs); 1979 #else /* defined(IRRADIANCE_HL2) */ 1980 return hl2_basis(N, ird.cubesides); 1981 #endif 1982 } 1983 1984 vec3 irradiance_from_cell_get(int cell, vec3 ir_dir) 1985 { 1986 IrradianceData ir_data = load_irradiance_cell(cell, ir_dir); 1987 return compute_irradiance(ir_dir, ir_data); 1988 } 1989 /* ----------- Uniforms --------- */ 1990 1991 uniform sampler2DArray probePlanars; 1992 uniform sampler2DArray probeCubes; 1993 1994 /* ----------- Structures --------- */ 1995 1996 struct CubeData { 1997 vec4 position_type; 1998 vec4 attenuation_fac_type; 1999 mat4 influencemat; 2000 mat4 parallaxmat; 2001 }; 2002 2003 #define PROBE_PARALLAX_BOX 1.0 2004 #define PROBE_ATTENUATION_BOX 1.0 2005 2006 #define p_position position_type.xyz 2007 #define p_parallax_type position_type.w 2008 #define p_atten_fac attenuation_fac_type.x 2009 #define p_atten_type attenuation_fac_type.y 2010 2011 struct PlanarData { 2012 vec4 plane_equation; 2013 vec4 clip_vec_x_fade_scale; 2014 vec4 clip_vec_y_fade_bias; 2015 vec4 clip_edges; 2016 vec4 facing_scale_bias; 2017 mat4 reflectionmat; /* transform world space into reflection texture space */ 2018 mat4 unused; 2019 }; 2020 2021 #define pl_plane_eq plane_equation 2022 #define pl_normal plane_equation.xyz 2023 #define pl_facing_scale facing_scale_bias.x 2024 #define pl_facing_bias facing_scale_bias.y 2025 #define pl_fade_scale clip_vec_x_fade_scale.w 2026 #define pl_fade_bias clip_vec_y_fade_bias.w 2027 #define pl_clip_pos_x clip_vec_x_fade_scale.xyz 2028 #define pl_clip_pos_y clip_vec_y_fade_bias.xyz 2029 #define pl_clip_edges clip_edges 2030 2031 struct GridData { 2032 mat4 localmat; 2033 ivec4 resolution_offset; 2034 vec4 ws_corner_atten_scale; /* world space corner position */ 2035 vec4 ws_increment_x_atten_bias; /* world space vector between 2 opposite cells */ 2036 vec4 ws_increment_y_lvl_bias; 2037 vec4 ws_increment_z; 2038 vec4 vis_bias_bleed_range; 2039 }; 2040 2041 #define g_corner ws_corner_atten_scale.xyz 2042 #define g_atten_scale ws_corner_atten_scale.w 2043 #define g_atten_bias ws_increment_x_atten_bias.w 2044 #define g_level_bias ws_increment_y_lvl_bias.w 2045 #define g_increment_x ws_increment_x_atten_bias.xyz 2046 #define g_increment_y ws_increment_y_lvl_bias.xyz 2047 #define g_increment_z ws_increment_z.xyz 2048 #define g_resolution resolution_offset.xyz 2049 #define g_offset resolution_offset.w 2050 #define g_vis_bias vis_bias_bleed_range.x 2051 #define g_vis_bleed vis_bias_bleed_range.y 2052 #define g_vis_range vis_bias_bleed_range.z 2053 2054 #ifndef MAX_PROBE 2055 # define MAX_PROBE 1 2056 #endif 2057 #ifndef MAX_GRID 2058 # define MAX_GRID 1 2059 #endif 2060 #ifndef MAX_PLANAR 2061 # define MAX_PLANAR 1 2062 #endif 2063 2064 #ifndef UTIL_TEX 2065 # define UTIL_TEX 2066 uniform sampler2DArray utilTex; 2067 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 2068 #endif /* UTIL_TEX */ 2069 2070 layout(std140) uniform probe_block 2071 { 2072 CubeData probes_data[MAX_PROBE]; 2073 }; 2074 2075 layout(std140) uniform grid_block 2076 { 2077 GridData grids_data[MAX_GRID]; 2078 }; 2079 2080 layout(std140) uniform planar_block 2081 { 2082 PlanarData planars_data[MAX_PLANAR]; 2083 }; 2084 2085 /* ----------- Functions --------- */ 2086 2087 float probe_attenuation_cube(int pd_id, vec3 W) 2088 { 2089 vec3 localpos = transform_point(probes_data[pd_id].influencemat, W); 2090 2091 float probe_atten_fac = probes_data[pd_id].p_atten_fac; 2092 float fac; 2093 if (probes_data[pd_id].p_atten_type == PROBE_ATTENUATION_BOX) { 2094 vec3 axes_fac = saturate(probe_atten_fac - probe_atten_fac * abs(localpos)); 2095 fac = min_v3(axes_fac); 2096 } 2097 else { 2098 fac = saturate(probe_atten_fac - probe_atten_fac * length(localpos)); 2099 } 2100 2101 return fac; 2102 } 2103 2104 float probe_attenuation_planar(PlanarData pd, vec3 W, vec3 N, float roughness) 2105 { 2106 /* Normal Facing */ 2107 float fac = saturate(dot(pd.pl_normal, N) * pd.pl_facing_scale + pd.pl_facing_bias); 2108 2109 /* Distance from plane */ 2110 fac *= saturate(abs(dot(pd.pl_plane_eq, vec4(W, 1.0))) * pd.pl_fade_scale + pd.pl_fade_bias); 2111 2112 /* Fancy fast clipping calculation */ 2113 vec2 dist_to_clip; 2114 dist_to_clip.x = dot(pd.pl_clip_pos_x, W); 2115 dist_to_clip.y = dot(pd.pl_clip_pos_y, W); 2116 /* compare and add all tests */ 2117 fac *= step(2.0, dot(step(pd.pl_clip_edges, dist_to_clip.xxyy), vec2(-1.0, 1.0).xyxy)); 2118 2119 /* Decrease influence for high roughness */ 2120 fac *= saturate(1.0 - roughness * 10.0); 2121 2122 return fac; 2123 } 2124 2125 float probe_attenuation_grid(GridData gd, mat4 localmat, vec3 W, out vec3 localpos) 2126 { 2127 localpos = transform_point(localmat, W); 2128 vec3 pos_to_edge = max(vec3(0.0), abs(localpos) - 1.0); 2129 float fade = length(pos_to_edge); 2130 return saturate(-fade * gd.g_atten_scale + gd.g_atten_bias); 2131 } 2132 2133 vec3 probe_evaluate_cube(int pd_id, vec3 W, vec3 R, float roughness) 2134 { 2135 /* Correct reflection ray using parallax volume intersection. */ 2136 vec3 localpos = transform_point(probes_data[pd_id].parallaxmat, W); 2137 vec3 localray = transform_direction(probes_data[pd_id].parallaxmat, R); 2138 2139 float dist; 2140 if (probes_data[pd_id].p_parallax_type == PROBE_PARALLAX_BOX) { 2141 dist = line_unit_box_intersect_dist(localpos, localray); 2142 } 2143 else { 2144 dist = line_unit_sphere_intersect_dist(localpos, localray); 2145 } 2146 2147 /* Use Distance in WS directly to recover intersection */ 2148 vec3 intersection = W + R * dist - probes_data[pd_id].p_position; 2149 2150 /* From Frostbite PBR Course 2151 * Distance based roughness 2152 * http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf */ 2153 float original_roughness = roughness; 2154 float linear_roughness = sqrt(roughness); 2155 float distance_roughness = saturate(dist * linear_roughness / length(intersection)); 2156 linear_roughness = mix(distance_roughness, linear_roughness, linear_roughness); 2157 roughness = linear_roughness * linear_roughness; 2158 2159 float fac = saturate(original_roughness * 2.0 - 1.0); 2160 R = mix(intersection, R, fac * fac); 2161 2162 return textureLod_octahedron( 2163 probeCubes, vec4(R, float(pd_id)), roughness * prbLodCubeMax, prbLodCubeMax) 2164 .rgb; 2165 } 2166 2167 vec3 probe_evaluate_world_spec(vec3 R, float roughness) 2168 { 2169 return textureLod_octahedron(probeCubes, vec4(R, 0.0), roughness * prbLodCubeMax, prbLodCubeMax) 2170 .rgb; 2171 } 2172 2173 vec3 probe_evaluate_planar( 2174 float id, PlanarData pd, vec3 W, vec3 N, vec3 V, float roughness, inout float fade) 2175 { 2176 /* Find view vector / reflection plane intersection. */ 2177 vec3 point_on_plane = line_plane_intersect(W, V, pd.pl_plane_eq); 2178 2179 /* How far the pixel is from the plane. */ 2180 float ref_depth = 1.0; /* TODO parameter */ 2181 2182 /* Compute distorded reflection vector based on the distance to the reflected object. 2183 * In other words find intersection between reflection vector and the sphere center 2184 * around point_on_plane. */ 2185 vec3 proj_ref = reflect(reflect(-V, N) * ref_depth, pd.pl_normal); 2186 2187 /* Final point in world space. */ 2188 vec3 ref_pos = point_on_plane + proj_ref; 2189 2190 /* Reproject to find texture coords. */ 2191 vec4 refco = ViewProjectionMatrix * vec4(ref_pos, 1.0); 2192 refco.xy /= refco.w; 2193 2194 /* TODO: If we support non-ssr planar reflection, we should blur them with gaussian 2195 * and chose the right mip depending on the cone footprint after projection */ 2196 /* NOTE: X is inverted here to compensate inverted drawing. */ 2197 vec3 sample = textureLod(probePlanars, vec3(refco.xy * vec2(-0.5, 0.5) + 0.5, id), 0.0).rgb; 2198 2199 return sample; 2200 } 2201 2202 void fallback_cubemap(vec3 N, 2203 vec3 V, 2204 vec3 W, 2205 vec3 viewPosition, 2206 float roughness, 2207 float roughnessSquared, 2208 inout vec4 spec_accum) 2209 { 2210 /* Specular probes */ 2211 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 2212 2213 #ifdef SSR_AO 2214 vec4 rand = texelfetch_noise_tex(gl_FragCoord.xy); 2215 vec3 bent_normal; 2216 float final_ao = occlusion_compute(N, viewPosition, 1.0, rand, bent_normal); 2217 final_ao = specular_occlusion(dot(N, V), final_ao, roughness); 2218 #else 2219 const float final_ao = 1.0; 2220 #endif 2221 2222 /* Starts at 1 because 0 is world probe */ 2223 for (int i = 1; i < MAX_PROBE && i < prbNumRenderCube && spec_accum.a < 0.999; ++i) { 2224 float fade = probe_attenuation_cube(i, W); 2225 2226 if (fade > 0.0) { 2227 vec3 spec = final_ao * probe_evaluate_cube(i, W, spec_dir, roughness); 2228 accumulate_light(spec, fade, spec_accum); 2229 } 2230 } 2231 2232 /* World Specular */ 2233 if (spec_accum.a < 0.999) { 2234 vec3 spec = final_ao * probe_evaluate_world_spec(spec_dir, roughness); 2235 accumulate_light(spec, 1.0, spec_accum); 2236 } 2237 } 2238 2239 #ifdef IRRADIANCE_LIB 2240 vec3 probe_evaluate_grid(GridData gd, vec3 W, vec3 N, vec3 localpos) 2241 { 2242 localpos = localpos * 0.5 + 0.5; 2243 localpos = localpos * vec3(gd.g_resolution) - 0.5; 2244 2245 vec3 localpos_floored = floor(localpos); 2246 vec3 trilinear_weight = fract(localpos); 2247 2248 float weight_accum = 0.0; 2249 vec3 irradiance_accum = vec3(0.0); 2250 2251 /* For each neighboor cells */ 2252 for (int i = 0; i < 8; ++i) { 2253 ivec3 offset = ivec3(i, i >> 1, i >> 2) & ivec3(1); 2254 vec3 cell_cos = clamp(localpos_floored + vec3(offset), vec3(0.0), vec3(gd.g_resolution) - 1.0); 2255 2256 /* Keep in sync with update_irradiance_probe */ 2257 ivec3 icell_cos = ivec3(gd.g_level_bias * floor(cell_cos / gd.g_level_bias)); 2258 int cell = gd.g_offset + icell_cos.z + icell_cos.y * gd.g_resolution.z + 2259 icell_cos.x * gd.g_resolution.z * gd.g_resolution.y; 2260 2261 vec3 color = irradiance_from_cell_get(cell, N); 2262 2263 /* We need this because we render probes in world space (so we need light vector in WS). 2264 * And rendering them in local probe space is too much problem. */ 2265 vec3 ws_cell_location = gd.g_corner + 2266 (gd.g_increment_x * cell_cos.x + gd.g_increment_y * cell_cos.y + 2267 gd.g_increment_z * cell_cos.z); 2268 2269 vec3 ws_point_to_cell = ws_cell_location - W; 2270 float ws_dist_point_to_cell = length(ws_point_to_cell); 2271 vec3 ws_light = ws_point_to_cell / ws_dist_point_to_cell; 2272 2273 /* Smooth backface test */ 2274 float weight = saturate(dot(ws_light, N)); 2275 2276 /* Precomputed visibility */ 2277 weight *= load_visibility_cell( 2278 cell, ws_light, ws_dist_point_to_cell, gd.g_vis_bias, gd.g_vis_bleed, gd.g_vis_range); 2279 2280 /* Smoother transition */ 2281 weight += prbIrradianceSmooth; 2282 2283 /* Trilinear weights */ 2284 vec3 trilinear = mix(1.0 - trilinear_weight, trilinear_weight, offset); 2285 weight *= trilinear.x * trilinear.y * trilinear.z; 2286 2287 /* Avoid zero weight */ 2288 weight = max(0.00001, weight); 2289 2290 weight_accum += weight; 2291 irradiance_accum += color * weight; 2292 } 2293 2294 return irradiance_accum / weight_accum; 2295 } 2296 2297 vec3 probe_evaluate_world_diff(vec3 N) 2298 { 2299 return irradiance_from_cell_get(0, N); 2300 } 2301 2302 #endif /* IRRADIANCE_LIB */ 2303 /** 2304 * Adapted from : 2305 * Real-Time Polygonal-Light Shading with Linearly Transformed Cosines. 2306 * Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt. 2307 * ACM Transactions on Graphics (Proceedings of ACM SIGGRAPH 2016) 35(4), 2016. 2308 * Project page: https://eheitzresearch.wordpress.com/415-2/ 2309 */ 2310 2311 #define USE_LTC 2312 2313 #ifndef UTIL_TEX 2314 # define UTIL_TEX 2315 uniform sampler2DArray utilTex; 2316 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 2317 #endif /* UTIL_TEX */ 2318 2319 /* Diffuse *clipped* sphere integral. */ 2320 float diffuse_sphere_integral(float avg_dir_z, float form_factor) 2321 { 2322 #if 1 2323 /* use tabulated horizon-clipped sphere */ 2324 vec2 uv = vec2(avg_dir_z * 0.5 + 0.5, form_factor); 2325 uv = uv * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 2326 2327 return texture(utilTex, vec3(uv, 3.0)).x; 2328 #else 2329 /* Cheap approximation. Less smooth and have energy issues. */ 2330 return max((form_factor * form_factor + avg_dir_z) / (form_factor + 1.0), 0.0); 2331 #endif 2332 } 2333 2334 /** 2335 * An extended version of the implementation from 2336 * "How to solve a cubic equation, revisited" 2337 * http://momentsingraphics.de/?p=105 2338 */ 2339 vec3 solve_cubic(vec4 coefs) 2340 { 2341 /* Normalize the polynomial */ 2342 coefs.xyz /= coefs.w; 2343 /* Divide middle coefficients by three */ 2344 coefs.yz /= 3.0; 2345 2346 float A = coefs.w; 2347 float B = coefs.z; 2348 float C = coefs.y; 2349 float D = coefs.x; 2350 2351 /* Compute the Hessian and the discriminant */ 2352 vec3 delta = vec3(-coefs.z * coefs.z + coefs.y, 2353 -coefs.y * coefs.z + coefs.x, 2354 dot(vec2(coefs.z, -coefs.y), coefs.xy)); 2355 2356 /* Discriminant */ 2357 float discr = dot(vec2(4.0 * delta.x, -delta.y), delta.zy); 2358 2359 vec2 xlc, xsc; 2360 2361 /* Algorithm A */ 2362 { 2363 float A_a = 1.0; 2364 float C_a = delta.x; 2365 float D_a = -2.0 * B * delta.x + delta.y; 2366 2367 /* Take the cubic root of a normalized complex number */ 2368 float theta = atan(sqrt(discr), -D_a) / 3.0; 2369 2370 float x_1a = 2.0 * sqrt(-C_a) * cos(theta); 2371 float x_3a = 2.0 * sqrt(-C_a) * cos(theta + (2.0 / 3.0) * M_PI); 2372 2373 float xl; 2374 if ((x_1a + x_3a) > 2.0 * B) { 2375 xl = x_1a; 2376 } 2377 else { 2378 xl = x_3a; 2379 } 2380 2381 xlc = vec2(xl - B, A); 2382 } 2383 2384 /* Algorithm D */ 2385 { 2386 float A_d = D; 2387 float C_d = delta.z; 2388 float D_d = -D * delta.y + 2.0 * C * delta.z; 2389 2390 /* Take the cubic root of a normalized complex number */ 2391 float theta = atan(D * sqrt(discr), -D_d) / 3.0; 2392 2393 float x_1d = 2.0 * sqrt(-C_d) * cos(theta); 2394 float x_3d = 2.0 * sqrt(-C_d) * cos(theta + (2.0 / 3.0) * M_PI); 2395 2396 float xs; 2397 if (x_1d + x_3d < 2.0 * C) { 2398 xs = x_1d; 2399 } 2400 else { 2401 xs = x_3d; 2402 } 2403 2404 xsc = vec2(-D, xs + C); 2405 } 2406 2407 float E = xlc.y * xsc.y; 2408 float F = -xlc.x * xsc.y - xlc.y * xsc.x; 2409 float G = xlc.x * xsc.x; 2410 2411 vec2 xmc = vec2(C * F - B * G, -B * F + C * E); 2412 2413 vec3 root = vec3(xsc.x / xsc.y, xmc.x / xmc.y, xlc.x / xlc.y); 2414 2415 if (root.x < root.y && root.x < root.z) { 2416 root.xyz = root.yxz; 2417 } 2418 else if (root.z < root.x && root.z < root.y) { 2419 root.xyz = root.xzy; 2420 } 2421 2422 return root; 2423 } 2424 2425 /* from Real-Time Area Lighting: a Journey from Research to Production 2426 * Stephen Hill and Eric Heitz */ 2427 vec3 edge_integral_vec(vec3 v1, vec3 v2) 2428 { 2429 float x = dot(v1, v2); 2430 float y = abs(x); 2431 2432 float a = 0.8543985 + (0.4965155 + 0.0145206 * y) * y; 2433 float b = 3.4175940 + (4.1616724 + y) * y; 2434 float v = a / b; 2435 2436 float theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt(max(1.0 - x * x, 1e-7)) - v; 2437 2438 return cross(v1, v2) * theta_sintheta; 2439 } 2440 2441 mat3 ltc_matrix(vec4 lut) 2442 { 2443 /* load inverse matrix */ 2444 mat3 Minv = mat3(vec3(lut.x, 0, lut.y), vec3(0, 1, 0), vec3(lut.z, 0, lut.w)); 2445 2446 return Minv; 2447 } 2448 2449 void ltc_transform_quad(vec3 N, vec3 V, mat3 Minv, inout vec3 corners[4]) 2450 { 2451 /* Avoid dot(N, V) == 1 in ortho mode, leading T1 normalize to fail. */ 2452 V = normalize(V + 1e-8); 2453 2454 /* construct orthonormal basis around N */ 2455 vec3 T1, T2; 2456 T1 = normalize(V - N * dot(N, V)); 2457 T2 = cross(N, T1); 2458 2459 /* rotate area light in (T1, T2, R) basis */ 2460 Minv = Minv * transpose(mat3(T1, T2, N)); 2461 2462 /* Apply LTC inverse matrix. */ 2463 corners[0] = normalize(Minv * corners[0]); 2464 corners[1] = normalize(Minv * corners[1]); 2465 corners[2] = normalize(Minv * corners[2]); 2466 corners[3] = normalize(Minv * corners[3]); 2467 } 2468 2469 /* If corners have already pass through ltc_transform_quad(), then N **MUST** be vec3(0.0, 0.0, 1.0), 2470 * corresponding to the Up axis of the shading basis. */ 2471 float ltc_evaluate_quad(vec3 corners[4], vec3 N) 2472 { 2473 /* Approximation using a sphere of the same solid angle than the quad. 2474 * Finding the clipped sphere diffuse integral is easier than clipping the quad. */ 2475 vec3 avg_dir; 2476 avg_dir = edge_integral_vec(corners[0], corners[1]); 2477 avg_dir += edge_integral_vec(corners[1], corners[2]); 2478 avg_dir += edge_integral_vec(corners[2], corners[3]); 2479 avg_dir += edge_integral_vec(corners[3], corners[0]); 2480 2481 float form_factor = length(avg_dir); 2482 float avg_dir_z = dot(N, avg_dir / form_factor); 2483 return form_factor * diffuse_sphere_integral(avg_dir_z, form_factor); 2484 } 2485 2486 /* If disk does not need to be transformed and is already front facing. */ 2487 float ltc_evaluate_disk_simple(float disk_radius, float NL) 2488 { 2489 float r_sqr = disk_radius * disk_radius; 2490 float one_r_sqr = 1.0 + r_sqr; 2491 float form_factor = r_sqr * inversesqrt(one_r_sqr * one_r_sqr); 2492 return form_factor * diffuse_sphere_integral(NL, form_factor); 2493 } 2494 2495 /* disk_points are WS vectors from the shading point to the disk "bounding domain" */ 2496 float ltc_evaluate_disk(vec3 N, vec3 V, mat3 Minv, vec3 disk_points[3]) 2497 { 2498 /* Avoid dot(N, V) == 1 in ortho mode, leading T1 normalize to fail. */ 2499 V = normalize(V + 1e-8); 2500 2501 /* construct orthonormal basis around N */ 2502 vec3 T1, T2; 2503 T1 = normalize(V - N * dot(V, N)); 2504 T2 = cross(N, T1); 2505 2506 /* rotate area light in (T1, T2, R) basis */ 2507 mat3 R = transpose(mat3(T1, T2, N)); 2508 2509 /* Intermediate step: init ellipse. */ 2510 vec3 L_[3]; 2511 L_[0] = mul(R, disk_points[0]); 2512 L_[1] = mul(R, disk_points[1]); 2513 L_[2] = mul(R, disk_points[2]); 2514 2515 vec3 C = 0.5 * (L_[0] + L_[2]); 2516 vec3 V1 = 0.5 * (L_[1] - L_[2]); 2517 vec3 V2 = 0.5 * (L_[1] - L_[0]); 2518 2519 /* Transform ellipse by Minv. */ 2520 C = Minv * C; 2521 V1 = Minv * V1; 2522 V2 = Minv * V2; 2523 2524 /* Compute eigenvectors of new ellipse. */ 2525 2526 float d11 = dot(V1, V1); 2527 float d22 = dot(V2, V2); 2528 float d12 = dot(V1, V2); 2529 float a, b; /* Eigenvalues */ 2530 const float threshold = 0.0007; /* Can be adjusted. Fix artifacts. */ 2531 if (abs(d12) / sqrt(d11 * d22) > threshold) { 2532 float tr = d11 + d22; 2533 float det = -d12 * d12 + d11 * d22; 2534 2535 /* use sqrt matrix to solve for eigenvalues */ 2536 det = sqrt(det); 2537 float u = 0.5 * sqrt(tr - 2.0 * det); 2538 float v = 0.5 * sqrt(tr + 2.0 * det); 2539 float e_max = (u + v); 2540 float e_min = (u - v); 2541 e_max *= e_max; 2542 e_min *= e_min; 2543 2544 vec3 V1_, V2_; 2545 if (d11 > d22) { 2546 V1_ = d12 * V1 + (e_max - d11) * V2; 2547 V2_ = d12 * V1 + (e_min - d11) * V2; 2548 } 2549 else { 2550 V1_ = d12 * V2 + (e_max - d22) * V1; 2551 V2_ = d12 * V2 + (e_min - d22) * V1; 2552 } 2553 2554 a = 1.0 / e_max; 2555 b = 1.0 / e_min; 2556 V1 = normalize(V1_); 2557 V2 = normalize(V2_); 2558 } 2559 else { 2560 a = 1.0 / d11; 2561 b = 1.0 / d22; 2562 V1 *= sqrt(a); 2563 V2 *= sqrt(b); 2564 } 2565 2566 /* Now find front facing ellipse with same solid angle. */ 2567 2568 vec3 V3 = normalize(cross(V1, V2)); 2569 if (dot(C, V3) < 0.0) { 2570 V3 *= -1.0; 2571 } 2572 2573 float L = dot(V3, C); 2574 float x0 = dot(V1, C) / L; 2575 float y0 = dot(V2, C) / L; 2576 2577 a *= L * L; 2578 b *= L * L; 2579 2580 float c0 = a * b; 2581 float c1 = a * b * (1.0 + x0 * x0 + y0 * y0) - a - b; 2582 float c2 = 1.0 - a * (1.0 + x0 * x0) - b * (1.0 + y0 * y0); 2583 float c3 = 1.0; 2584 2585 vec3 roots = solve_cubic(vec4(c0, c1, c2, c3)); 2586 float e1 = roots.x; 2587 float e2 = roots.y; 2588 float e3 = roots.z; 2589 2590 vec3 avg_dir = vec3(a * x0 / (a - e2), b * y0 / (b - e2), 1.0); 2591 2592 mat3 rotate = mat3(V1, V2, V3); 2593 2594 avg_dir = rotate * avg_dir; 2595 avg_dir = normalize(avg_dir); 2596 2597 /* L1, L2 are the extends of the front facing ellipse. */ 2598 float L1 = sqrt(-e2 / e3); 2599 float L2 = sqrt(-e2 / e1); 2600 2601 /* Find the sphere and compute lighting. */ 2602 float form_factor = max(0.0, L1 * L2 * inversesqrt((1.0 + L1 * L1) * (1.0 + L2 * L2))); 2603 return form_factor * diffuse_sphere_integral(avg_dir.z, form_factor); 2604 } 2605 2606 uniform sampler2DArray shadowCubeTexture; 2607 uniform sampler2DArray shadowCascadeTexture; 2608 2609 #define LAMPS_LIB 2610 2611 layout(std140) uniform shadow_block 2612 { 2613 ShadowData shadows_data[MAX_SHADOW]; 2614 ShadowCubeData shadows_cube_data[MAX_SHADOW_CUBE]; 2615 ShadowCascadeData shadows_cascade_data[MAX_SHADOW_CASCADE]; 2616 }; 2617 2618 layout(std140) uniform light_block 2619 { 2620 LightData lights_data[MAX_LIGHT]; 2621 }; 2622 2623 /* type */ 2624 #define POINT 0.0 2625 #define SUN 1.0 2626 #define SPOT 2.0 2627 #define AREA_RECT 4.0 2628 /* Used to define the area light shape, doesn't directly correspond to a Blender light type. */ 2629 #define AREA_ELLIPSE 100.0 2630 2631 #if defined(SHADOW_VSM) 2632 # define ShadowSample vec2 2633 # define sample_cube(vec, id) texture_octahedron(shadowCubeTexture, vec4(vec, id)).rg 2634 # define sample_cascade(vec, id) texture(shadowCascadeTexture, vec3(vec, id)).rg 2635 #elif defined(SHADOW_ESM) 2636 # define ShadowSample float 2637 # define sample_cube(vec, id) texture_octahedron(shadowCubeTexture, vec4(vec, id)).r 2638 # define sample_cascade(vec, id) texture(shadowCascadeTexture, vec3(vec, id)).r 2639 #else 2640 # define ShadowSample float 2641 # define sample_cube(vec, id) texture_octahedron(shadowCubeTexture, vec4(vec, id)).r 2642 # define sample_cascade(vec, id) texture(shadowCascadeTexture, vec3(vec, id)).r 2643 #endif 2644 2645 #if defined(SHADOW_VSM) 2646 # define get_depth_delta(dist, s) (dist - s.x) 2647 #else 2648 # define get_depth_delta(dist, s) (dist - s) 2649 #endif 2650 2651 /* ----------------------------------------------------------- */ 2652 /* ----------------------- Shadow tests ---------------------- */ 2653 /* ----------------------------------------------------------- */ 2654 2655 #if defined(SHADOW_VSM) 2656 2657 float shadow_test(ShadowSample moments, float dist, ShadowData sd) 2658 { 2659 float p = 0.0; 2660 2661 if (dist <= moments.x) { 2662 p = 1.0; 2663 } 2664 2665 float variance = moments.y - (moments.x * moments.x); 2666 variance = max(variance, sd.sh_bias / 10.0); 2667 2668 float d = moments.x - dist; 2669 float p_max = variance / (variance + d * d); 2670 2671 /* Now reduce light-bleeding by removing the [0, x] tail and linearly rescaling (x, 1] */ 2672 p_max = clamp((p_max - sd.sh_bleed) / (1.0 - sd.sh_bleed), 0.0, 1.0); 2673 2674 return max(p, p_max); 2675 } 2676 2677 #elif defined(SHADOW_ESM) 2678 2679 float shadow_test(ShadowSample z, float dist, ShadowData sd) 2680 { 2681 return saturate(exp(sd.sh_exp * (z - dist + sd.sh_bias))); 2682 } 2683 2684 #else 2685 2686 float shadow_test(ShadowSample z, float dist, ShadowData sd) 2687 { 2688 return step(0, z - dist + sd.sh_bias); 2689 } 2690 2691 #endif 2692 2693 /* ----------------------------------------------------------- */ 2694 /* ----------------------- Shadow types ---------------------- */ 2695 /* ----------------------------------------------------------- */ 2696 2697 float shadow_cubemap(ShadowData sd, ShadowCubeData scd, float texid, vec3 W) 2698 { 2699 vec3 cubevec = W - scd.position.xyz; 2700 float dist = length(cubevec); 2701 2702 cubevec /= dist; 2703 2704 ShadowSample s = sample_cube(cubevec, texid); 2705 return shadow_test(s, dist, sd); 2706 } 2707 2708 float evaluate_cascade(ShadowData sd, mat4 shadowmat, vec3 W, float range, float texid) 2709 { 2710 vec4 shpos = shadowmat * vec4(W, 1.0); 2711 float dist = shpos.z * range; 2712 2713 ShadowSample s = sample_cascade(shpos.xy, texid); 2714 float vis = shadow_test(s, dist, sd); 2715 2716 /* If fragment is out of shadowmap range, do not occlude */ 2717 if (shpos.z < 1.0 && shpos.z > 0.0) { 2718 return vis; 2719 } 2720 else { 2721 return 1.0; 2722 } 2723 } 2724 2725 float shadow_cascade(ShadowData sd, int scd_id, float texid, vec3 W) 2726 { 2727 vec4 view_z = vec4(dot(W - cameraPos, cameraForward)); 2728 vec4 weights = smoothstep(shadows_cascade_data[scd_id].split_end_distances, 2729 shadows_cascade_data[scd_id].split_start_distances.yzwx, 2730 view_z); 2731 2732 weights.yzw -= weights.xyz; 2733 2734 vec4 vis = vec4(1.0); 2735 float range = abs(sd.sh_far - sd.sh_near); /* Same factor as in get_cascade_world_distance(). */ 2736 2737 /* Branching using (weights > 0.0) is reaally slooow on intel so avoid it for now. */ 2738 /* TODO OPTI: Only do 2 samples and blend. */ 2739 vis.x = evaluate_cascade(sd, shadows_cascade_data[scd_id].shadowmat[0], W, range, texid + 0); 2740 vis.y = evaluate_cascade(sd, shadows_cascade_data[scd_id].shadowmat[1], W, range, texid + 1); 2741 vis.z = evaluate_cascade(sd, shadows_cascade_data[scd_id].shadowmat[2], W, range, texid + 2); 2742 vis.w = evaluate_cascade(sd, shadows_cascade_data[scd_id].shadowmat[3], W, range, texid + 3); 2743 2744 float weight_sum = dot(vec4(1.0), weights); 2745 if (weight_sum > 0.9999) { 2746 float vis_sum = dot(vec4(1.0), vis * weights); 2747 return vis_sum / weight_sum; 2748 } 2749 else { 2750 float vis_sum = dot(vec4(1.0), vis * step(0.001, weights)); 2751 return mix(1.0, vis_sum, weight_sum); 2752 } 2753 } 2754 2755 /* ----------------------------------------------------------- */ 2756 /* --------------------- Light Functions --------------------- */ 2757 /* ----------------------------------------------------------- */ 2758 2759 /* From Frostbite PBR Course 2760 * Distance based attenuation 2761 * http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf */ 2762 float distance_attenuation(float dist_sqr, float inv_sqr_influence) 2763 { 2764 float factor = dist_sqr * inv_sqr_influence; 2765 float fac = saturate(1.0 - factor * factor); 2766 return fac * fac; 2767 } 2768 2769 float spot_attenuation(LightData ld, vec3 l_vector) 2770 { 2771 float z = dot(ld.l_forward, l_vector.xyz); 2772 vec3 lL = l_vector.xyz / z; 2773 float x = dot(ld.l_right, lL) / ld.l_sizex; 2774 float y = dot(ld.l_up, lL) / ld.l_sizey; 2775 float ellipse = inversesqrt(1.0 + x * x + y * y); 2776 float spotmask = smoothstep(0.0, 1.0, (ellipse - ld.l_spot_size) / ld.l_spot_blend); 2777 return spotmask; 2778 } 2779 2780 float light_visibility(LightData ld, 2781 vec3 W, 2782 #ifndef VOLUMETRICS 2783 vec3 viewPosition, 2784 vec3 viewNormal, 2785 #endif 2786 vec4 l_vector) 2787 { 2788 float vis = 1.0; 2789 2790 if (ld.l_type == SPOT) { 2791 vis *= spot_attenuation(ld, l_vector.xyz); 2792 } 2793 if (ld.l_type >= SPOT) { 2794 vis *= step(0.0, -dot(l_vector.xyz, ld.l_forward)); 2795 } 2796 if (ld.l_type != SUN) { 2797 vis *= distance_attenuation(l_vector.w * l_vector.w, ld.l_influence); 2798 } 2799 2800 #if !defined(VOLUMETRICS) || defined(VOLUME_SHADOW) 2801 /* shadowing */ 2802 if (ld.l_shadowid >= 0.0 && vis > 0.001) { 2803 ShadowData data = shadows_data[int(ld.l_shadowid)]; 2804 2805 if (ld.l_type == SUN) { 2806 vis *= shadow_cascade(data, int(data.sh_data_start), data.sh_tex_start, W); 2807 } 2808 else { 2809 vis *= shadow_cubemap( 2810 data, shadows_cube_data[int(data.sh_data_start)], data.sh_tex_start, W); 2811 } 2812 2813 # ifndef VOLUMETRICS 2814 /* Only compute if not already in shadow. */ 2815 if (data.sh_contact_dist > 0.0) { 2816 vec4 L = (ld.l_type != SUN) ? l_vector : vec4(-ld.l_forward, 1.0); 2817 float trace_distance = (ld.l_type != SUN) ? min(data.sh_contact_dist, l_vector.w) : 2818 data.sh_contact_dist; 2819 2820 vec3 T, B; 2821 make_orthonormal_basis(L.xyz / L.w, T, B); 2822 2823 vec4 rand = texelfetch_noise_tex(gl_FragCoord.xy); 2824 rand.zw *= fast_sqrt(rand.y) * data.sh_contact_spread; 2825 2826 /* We use the full l_vector.xyz so that the spread is minimize 2827 * if the shading point is further away from the light source */ 2828 vec3 ray_dir = L.xyz + T * rand.z + B * rand.w; 2829 ray_dir = transform_direction(ViewMatrix, ray_dir); 2830 ray_dir = normalize(ray_dir); 2831 2832 vec3 ray_ori = viewPosition; 2833 2834 if (dot(viewNormal, ray_dir) <= 0.0) { 2835 return vis; 2836 } 2837 2838 float bias = 0.5; /* Constant Bias */ 2839 bias += 1.0 - abs(dot(viewNormal, ray_dir)); /* Angle dependent bias */ 2840 bias *= gl_FrontFacing ? data.sh_contact_offset : -data.sh_contact_offset; 2841 2842 vec3 nor_bias = viewNormal * bias; 2843 ray_ori += nor_bias; 2844 2845 ray_dir *= trace_distance; 2846 ray_dir -= nor_bias; 2847 2848 vec3 hit_pos = raycast( 2849 -1, ray_ori, ray_dir, data.sh_contact_thickness, rand.x, 0.1, 0.001, false); 2850 2851 if (hit_pos.z > 0.0) { 2852 hit_pos = get_view_space_from_depth(hit_pos.xy, hit_pos.z); 2853 float hit_dist = distance(viewPosition, hit_pos); 2854 float dist_ratio = hit_dist / trace_distance; 2855 return vis * saturate(dist_ratio * dist_ratio * dist_ratio); 2856 } 2857 } 2858 # endif 2859 } 2860 #endif 2861 2862 return vis; 2863 } 2864 2865 #ifdef USE_LTC 2866 float light_diffuse(LightData ld, vec3 N, vec3 V, vec4 l_vector) 2867 { 2868 if (ld.l_type == AREA_RECT) { 2869 vec3 corners[4]; 2870 corners[0] = normalize((l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * ld.l_sizey); 2871 corners[1] = normalize((l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * -ld.l_sizey); 2872 corners[2] = normalize((l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * -ld.l_sizey); 2873 corners[3] = normalize((l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * ld.l_sizey); 2874 2875 return ltc_evaluate_quad(corners, N); 2876 } 2877 else if (ld.l_type == AREA_ELLIPSE) { 2878 vec3 points[3]; 2879 points[0] = (l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * -ld.l_sizey; 2880 points[1] = (l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * -ld.l_sizey; 2881 points[2] = (l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * ld.l_sizey; 2882 2883 return ltc_evaluate_disk(N, V, mat3(1.0), points); 2884 } 2885 else { 2886 float radius = ld.l_radius; 2887 radius /= (ld.l_type == SUN) ? 1.0 : l_vector.w; 2888 vec3 L = (ld.l_type == SUN) ? -ld.l_forward : (l_vector.xyz / l_vector.w); 2889 2890 return ltc_evaluate_disk_simple(radius, dot(N, L)); 2891 } 2892 } 2893 2894 float light_specular(LightData ld, vec4 ltc_mat, vec3 N, vec3 V, vec4 l_vector) 2895 { 2896 if (ld.l_type == AREA_RECT) { 2897 vec3 corners[4]; 2898 corners[0] = (l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * ld.l_sizey; 2899 corners[1] = (l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * -ld.l_sizey; 2900 corners[2] = (l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * -ld.l_sizey; 2901 corners[3] = (l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * ld.l_sizey; 2902 2903 ltc_transform_quad(N, V, ltc_matrix(ltc_mat), corners); 2904 2905 return ltc_evaluate_quad(corners, vec3(0.0, 0.0, 1.0)); 2906 } 2907 else { 2908 bool is_ellipse = (ld.l_type == AREA_ELLIPSE); 2909 float radius_x = is_ellipse ? ld.l_sizex : ld.l_radius; 2910 float radius_y = is_ellipse ? ld.l_sizey : ld.l_radius; 2911 2912 vec3 L = (ld.l_type == SUN) ? -ld.l_forward : l_vector.xyz; 2913 vec3 Px = ld.l_right; 2914 vec3 Py = ld.l_up; 2915 2916 if (ld.l_type == SPOT || ld.l_type == POINT) { 2917 make_orthonormal_basis(l_vector.xyz / l_vector.w, Px, Py); 2918 } 2919 2920 vec3 points[3]; 2921 points[0] = (L + Px * -radius_x) + Py * -radius_y; 2922 points[1] = (L + Px * radius_x) + Py * -radius_y; 2923 points[2] = (L + Px * radius_x) + Py * radius_y; 2924 2925 return ltc_evaluate_disk(N, V, ltc_matrix(ltc_mat), points); 2926 } 2927 } 2928 #endif 2929 2930 #define MAX_SSS_SAMPLES 65 2931 #define SSS_LUT_SIZE 64.0 2932 #define SSS_LUT_SCALE ((SSS_LUT_SIZE - 1.0) / float(SSS_LUT_SIZE)) 2933 #define SSS_LUT_BIAS (0.5 / float(SSS_LUT_SIZE)) 2934 2935 #ifdef USE_TRANSLUCENCY 2936 layout(std140) uniform sssProfile 2937 { 2938 vec4 kernel[MAX_SSS_SAMPLES]; 2939 vec4 radii_max_radius; 2940 int sss_samples; 2941 }; 2942 2943 uniform sampler1D sssTexProfile; 2944 2945 vec3 sss_profile(float s) 2946 { 2947 s /= radii_max_radius.w; 2948 return texture(sssTexProfile, saturate(s) * SSS_LUT_SCALE + SSS_LUT_BIAS).rgb; 2949 } 2950 #endif 2951 2952 vec3 light_translucent(LightData ld, vec3 W, vec3 N, vec4 l_vector, float scale) 2953 { 2954 #if !defined(USE_TRANSLUCENCY) || defined(VOLUMETRICS) 2955 return vec3(0.0); 2956 #else 2957 vec3 vis = vec3(1.0); 2958 2959 if (ld.l_type == SPOT) { 2960 vis *= spot_attenuation(ld, l_vector.xyz); 2961 } 2962 if (ld.l_type >= SPOT) { 2963 vis *= step(0.0, -dot(l_vector.xyz, ld.l_forward)); 2964 } 2965 if (ld.l_type != SUN) { 2966 vis *= distance_attenuation(l_vector.w * l_vector.w, ld.l_influence); 2967 } 2968 2969 /* Only shadowed light can produce translucency */ 2970 if (ld.l_shadowid >= 0.0 && vis.x > 0.001) { 2971 ShadowData data = shadows_data[int(ld.l_shadowid)]; 2972 float delta; 2973 2974 vec4 L = (ld.l_type != SUN) ? l_vector : vec4(-ld.l_forward, 1.0); 2975 2976 vec3 T, B; 2977 make_orthonormal_basis(L.xyz / L.w, T, B); 2978 2979 vec4 rand = texelfetch_noise_tex(gl_FragCoord.xy); 2980 rand.zw *= fast_sqrt(rand.y) * data.sh_blur; 2981 2982 /* We use the full l_vector.xyz so that the spread is minimize 2983 * if the shading point is further away from the light source */ 2984 W = W + T * rand.z + B * rand.w; 2985 2986 if (ld.l_type == SUN) { 2987 int scd_id = int(data.sh_data_start); 2988 vec4 view_z = vec4(dot(W - cameraPos, cameraForward)); 2989 2990 vec4 weights = step(shadows_cascade_data[scd_id].split_end_distances, view_z); 2991 float id = abs(4.0 - dot(weights, weights)); 2992 2993 if (id > 3.0) { 2994 return vec3(0.0); 2995 } 2996 2997 float range = abs(data.sh_far - 2998 data.sh_near); /* Same factor as in get_cascade_world_distance(). */ 2999 3000 vec4 shpos = shadows_cascade_data[scd_id].shadowmat[int(id)] * vec4(W, 1.0); 3001 float dist = shpos.z * range; 3002 3003 if (shpos.z > 1.0 || shpos.z < 0.0) { 3004 return vec3(0.0); 3005 } 3006 3007 ShadowSample s = sample_cascade(shpos.xy, data.sh_tex_start + id); 3008 delta = get_depth_delta(dist, s); 3009 } 3010 else { 3011 vec3 cubevec = W - shadows_cube_data[int(data.sh_data_start)].position.xyz; 3012 float dist = length(cubevec); 3013 cubevec /= dist; 3014 3015 ShadowSample s = sample_cube(cubevec, data.sh_tex_start); 3016 delta = get_depth_delta(dist, s); 3017 } 3018 3019 /* XXX : Removing Area Power. */ 3020 /* TODO : put this out of the shader. */ 3021 float falloff; 3022 if (ld.l_type == AREA_RECT || ld.l_type == AREA_ELLIPSE) { 3023 vis *= (ld.l_sizex * ld.l_sizey * 4.0 * M_PI) * (1.0 / 80.0); 3024 if (ld.l_type == AREA_ELLIPSE) { 3025 vis *= M_PI * 0.25; 3026 } 3027 vis *= 0.3 * 20.0 * 3028 max(0.0, dot(-ld.l_forward, l_vector.xyz / l_vector.w)); /* XXX ad hoc, empirical */ 3029 vis /= (l_vector.w * l_vector.w); 3030 falloff = dot(N, l_vector.xyz / l_vector.w); 3031 } 3032 else if (ld.l_type == SUN) { 3033 vis /= 1.0f + (ld.l_radius * ld.l_radius * 0.5f); 3034 vis *= ld.l_radius * ld.l_radius * M_PI; /* Removing area light power*/ 3035 vis *= M_2PI * 0.78; /* Matching cycles with point light. */ 3036 vis *= 0.082; /* XXX ad hoc, empirical */ 3037 falloff = dot(N, -ld.l_forward); 3038 } 3039 else { 3040 vis *= (4.0 * ld.l_radius * ld.l_radius) * (1.0 / 10.0); 3041 vis *= 1.5; /* XXX ad hoc, empirical */ 3042 vis /= (l_vector.w * l_vector.w); 3043 falloff = dot(N, l_vector.xyz / l_vector.w); 3044 } 3045 // vis *= M_1_PI; /* Normalize */ 3046 3047 /* Applying profile */ 3048 vis *= sss_profile(abs(delta) / scale); 3049 3050 /* No transmittance at grazing angle (hide artifacts) */ 3051 vis *= saturate(falloff * 2.0); 3052 } 3053 else { 3054 vis = vec3(0.0); 3055 } 3056 3057 return vis; 3058 #endif 3059 } 3060 3061 #ifndef LIT_SURFACE_UNIFORM 3062 #define LIT_SURFACE_UNIFORM 3063 3064 uniform float refractionDepth; 3065 3066 #ifndef UTIL_TEX 3067 # define UTIL_TEX 3068 uniform sampler2DArray utilTex; 3069 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 3070 #endif /* UTIL_TEX */ 3071 3072 in vec3 worldPosition; 3073 in vec3 viewPosition; 3074 3075 #ifdef USE_FLAT_NORMAL 3076 flat in vec3 worldNormal; 3077 flat in vec3 viewNormal; 3078 #else 3079 in vec3 worldNormal; 3080 in vec3 viewNormal; 3081 #endif 3082 3083 #ifdef HAIR_SHADER 3084 in vec3 hairTangent; /* world space */ 3085 in float hairThickTime; 3086 in float hairThickness; 3087 in float hairTime; 3088 flat in int hairStrandID; 3089 3090 uniform int hairThicknessRes = 1; 3091 #endif 3092 3093 #endif /* LIT_SURFACE_UNIFORM */ 3094 3095 /** AUTO CONFIG 3096 * We include the file multiple times each time with a different configuration. 3097 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 3098 */ 3099 #if !defined(SURFACE_DEFAULT) 3100 #define SURFACE_DEFAULT 3101 #define CLOSURE_NAME eevee_closure_default 3102 #define CLOSURE_DIFFUSE 3103 #define CLOSURE_GLOSSY 3104 #endif /* SURFACE_DEFAULT */ 3105 3106 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 3107 #define SURFACE_PRINCIPLED 3108 #define CLOSURE_NAME eevee_closure_principled 3109 #define CLOSURE_DIFFUSE 3110 #define CLOSURE_GLOSSY 3111 #define CLOSURE_CLEARCOAT 3112 #define CLOSURE_REFRACTION 3113 #define CLOSURE_SUBSURFACE 3114 #endif /* SURFACE_PRINCIPLED */ 3115 3116 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 3117 #define SURFACE_CLEARCOAT 3118 #define CLOSURE_NAME eevee_closure_clearcoat 3119 #define CLOSURE_GLOSSY 3120 #define CLOSURE_CLEARCOAT 3121 #endif /* SURFACE_CLEARCOAT */ 3122 3123 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 3124 #define SURFACE_DIFFUSE 3125 #define CLOSURE_NAME eevee_closure_diffuse 3126 #define CLOSURE_DIFFUSE 3127 #endif /* SURFACE_DIFFUSE */ 3128 3129 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 3130 #define SURFACE_SUBSURFACE 3131 #define CLOSURE_NAME eevee_closure_subsurface 3132 #define CLOSURE_DIFFUSE 3133 #define CLOSURE_SUBSURFACE 3134 #endif /* SURFACE_SUBSURFACE */ 3135 3136 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 3137 #define SURFACE_SKIN 3138 #define CLOSURE_NAME eevee_closure_skin 3139 #define CLOSURE_DIFFUSE 3140 #define CLOSURE_SUBSURFACE 3141 #define CLOSURE_GLOSSY 3142 #endif /* SURFACE_SKIN */ 3143 3144 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 3145 #define SURFACE_GLOSSY 3146 #define CLOSURE_NAME eevee_closure_glossy 3147 #define CLOSURE_GLOSSY 3148 #endif /* SURFACE_GLOSSY */ 3149 3150 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 3151 #define SURFACE_REFRACT 3152 #define CLOSURE_NAME eevee_closure_refraction 3153 #define CLOSURE_REFRACTION 3154 #endif /* SURFACE_REFRACT */ 3155 3156 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 3157 #define SURFACE_GLASS 3158 #define CLOSURE_NAME eevee_closure_glass 3159 #define CLOSURE_GLOSSY 3160 #define CLOSURE_REFRACTION 3161 #endif /* SURFACE_GLASS */ 3162 3163 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 3164 #ifdef CLOSURE_CLEARCOAT 3165 #ifndef CLOSURE_GLOSSY 3166 # define CLOSURE_GLOSSY 3167 #endif 3168 #endif /* CLOSURE_CLEARCOAT */ 3169 3170 void CLOSURE_NAME(vec3 N 3171 #ifdef CLOSURE_DIFFUSE 3172 , 3173 vec3 albedo 3174 #endif 3175 #ifdef CLOSURE_GLOSSY 3176 , 3177 vec3 f0, 3178 int ssr_id 3179 #endif 3180 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3181 , 3182 float roughness 3183 #endif 3184 #ifdef CLOSURE_CLEARCOAT 3185 , 3186 vec3 C_N, 3187 float C_intensity, 3188 float C_roughness 3189 #endif 3190 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 3191 , 3192 float ao 3193 #endif 3194 #ifdef CLOSURE_SUBSURFACE 3195 , 3196 float sss_scale 3197 #endif 3198 #ifdef CLOSURE_REFRACTION 3199 , 3200 float ior 3201 #endif 3202 #ifdef CLOSURE_DIFFUSE 3203 , 3204 out vec3 out_diff 3205 #endif 3206 #ifdef CLOSURE_SUBSURFACE 3207 , 3208 out vec3 out_trans 3209 #endif 3210 #ifdef CLOSURE_GLOSSY 3211 , 3212 out vec3 out_spec 3213 #endif 3214 #ifdef CLOSURE_REFRACTION 3215 , 3216 out vec3 out_refr 3217 #endif 3218 #ifdef CLOSURE_GLOSSY 3219 , 3220 out vec3 ssr_spec 3221 #endif 3222 ) 3223 { 3224 #ifdef CLOSURE_DIFFUSE 3225 out_diff = vec3(0.0); 3226 #endif 3227 3228 #ifdef CLOSURE_SUBSURFACE 3229 out_trans = vec3(0.0); 3230 #endif 3231 3232 #ifdef CLOSURE_GLOSSY 3233 out_spec = vec3(0.0); 3234 #endif 3235 3236 #ifdef CLOSURE_REFRACTION 3237 out_refr = vec3(0.0); 3238 #endif 3239 3240 #ifdef SHADOW_SHADER 3241 return; 3242 #endif 3243 3244 /* Zero length vectors cause issues, see: T51979. */ 3245 float len = length(N); 3246 if (isnan(len)) { 3247 return; 3248 } 3249 N /= len; 3250 3251 #ifdef CLOSURE_CLEARCOAT 3252 len = length(C_N); 3253 if (isnan(len)) { 3254 return; 3255 } 3256 C_N /= len; 3257 #endif 3258 3259 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3260 roughness = clamp(roughness, 1e-8, 0.9999); 3261 float roughnessSquared = roughness * roughness; 3262 #endif 3263 3264 #ifdef CLOSURE_CLEARCOAT 3265 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 3266 float C_roughnessSquared = C_roughness * C_roughness; 3267 #endif 3268 3269 vec3 V = cameraVec; 3270 3271 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 3272 3273 /* ---------------------------------------------------------------- */ 3274 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 3275 /* ---------------------------------------------------------------- */ 3276 3277 #ifdef CLOSURE_GLOSSY 3278 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 3279 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 3280 #endif 3281 3282 #ifdef CLOSURE_CLEARCOAT 3283 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 3284 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 3285 vec3 out_spec_clear = vec3(0.0); 3286 #endif 3287 3288 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 3289 LightData ld = lights_data[i]; 3290 3291 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 3292 l_vector.xyz = ld.l_position - worldPosition; 3293 l_vector.w = length(l_vector.xyz); 3294 3295 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 3296 3297 if (l_vis < 1e-8) { 3298 continue; 3299 } 3300 3301 vec3 l_color_vis = ld.l_color * l_vis; 3302 3303 #ifdef CLOSURE_DIFFUSE 3304 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 3305 #endif 3306 3307 #ifdef CLOSURE_SUBSURFACE 3308 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 3309 #endif 3310 3311 #ifdef CLOSURE_GLOSSY 3312 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 3313 #endif 3314 3315 #ifdef CLOSURE_CLEARCOAT 3316 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 3317 ld.l_spec; 3318 #endif 3319 } 3320 3321 #ifdef CLOSURE_GLOSSY 3322 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 3323 out_spec *= F_area(f0, brdf_lut_lights.xy); 3324 #endif 3325 3326 #ifdef CLOSURE_CLEARCOAT 3327 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 3328 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 3329 out_spec += out_spec_clear * C_intensity; 3330 #endif 3331 3332 /* ---------------------------------------------------------------- */ 3333 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 3334 /* ---------------------------------------------------------------- */ 3335 3336 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 3337 #ifdef CLOSURE_GLOSSY 3338 vec4 spec_accum = vec4(0.0); 3339 #endif 3340 3341 #ifdef CLOSURE_CLEARCOAT 3342 vec4 C_spec_accum = vec4(0.0); 3343 #endif 3344 3345 #ifdef CLOSURE_REFRACTION 3346 vec4 refr_accum = vec4(0.0); 3347 #endif 3348 3349 #ifdef CLOSURE_GLOSSY 3350 /* ---------------------------- */ 3351 /* Planar Reflections */ 3352 /* ---------------------------- */ 3353 3354 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 3355 PlanarData pd = planars_data[i]; 3356 3357 /* Fade on geometric normal. */ 3358 float fade = probe_attenuation_planar( 3359 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 3360 3361 if (fade > 0.0) { 3362 if (!(ssrToggle && ssr_id == outputSsrId)) { 3363 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 3364 accumulate_light(spec, fade, spec_accum); 3365 } 3366 3367 #ifdef CLOSURE_CLEARCOAT 3368 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 3369 accumulate_light(C_spec, fade, C_spec_accum); 3370 #endif 3371 } 3372 } 3373 #endif 3374 3375 #ifdef CLOSURE_GLOSSY 3376 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 3377 #endif 3378 3379 #ifdef CLOSURE_CLEARCOAT 3380 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 3381 #endif 3382 3383 #ifdef CLOSURE_REFRACTION 3384 /* Refract the view vector using the depth heuristic. 3385 * Then later Refract a second time the already refracted 3386 * ray using the inverse ior. */ 3387 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 3388 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 3389 vec3 refr_pos = (refractionDepth > 0.0) ? 3390 line_plane_intersect( 3391 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 3392 worldPosition; 3393 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 3394 #endif 3395 3396 #ifdef CLOSURE_REFRACTION 3397 /* ---------------------------- */ 3398 /* Screen Space Refraction */ 3399 /* ---------------------------- */ 3400 #ifdef USE_REFRACTION 3401 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 3402 /* Find approximated position of the 2nd refraction event. */ 3403 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 3404 viewPosition; 3405 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 3406 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 3407 accumulate_light(trans.rgb, trans.a, refr_accum); 3408 } 3409 #endif 3410 3411 #endif 3412 3413 /* ---------------------------- */ 3414 /* Specular probes */ 3415 /* ---------------------------- */ 3416 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3417 3418 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 3419 # define GLASS_ACCUM 1 3420 # define ACCUM min(refr_accum.a, spec_accum.a) 3421 #elif defined(CLOSURE_REFRACTION) 3422 # define GLASS_ACCUM 0 3423 # define ACCUM refr_accum.a 3424 #else 3425 # define GLASS_ACCUM 0 3426 # define ACCUM spec_accum.a 3427 #endif 3428 3429 /* Starts at 1 because 0 is world probe */ 3430 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 3431 float fade = probe_attenuation_cube(i, worldPosition); 3432 3433 if (fade > 0.0) { 3434 3435 #if GLASS_ACCUM 3436 if (spec_accum.a < 0.999) { 3437 #endif 3438 #ifdef CLOSURE_GLOSSY 3439 if (!(ssrToggle && ssr_id == outputSsrId)) { 3440 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 3441 accumulate_light(spec, fade, spec_accum); 3442 } 3443 #endif 3444 3445 #ifdef CLOSURE_CLEARCOAT 3446 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 3447 accumulate_light(C_spec, fade, C_spec_accum); 3448 #endif 3449 #if GLASS_ACCUM 3450 } 3451 #endif 3452 3453 #if GLASS_ACCUM 3454 if (refr_accum.a < 0.999) { 3455 #endif 3456 #ifdef CLOSURE_REFRACTION 3457 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 3458 accumulate_light(trans, fade, refr_accum); 3459 #endif 3460 #if GLASS_ACCUM 3461 } 3462 #endif 3463 } 3464 } 3465 3466 #undef GLASS_ACCUM 3467 #undef ACCUM 3468 3469 /* ---------------------------- */ 3470 /* World Probe */ 3471 /* ---------------------------- */ 3472 #ifdef CLOSURE_GLOSSY 3473 if (spec_accum.a < 0.999) { 3474 if (!(ssrToggle && ssr_id == outputSsrId)) { 3475 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 3476 accumulate_light(spec, 1.0, spec_accum); 3477 } 3478 3479 # ifdef CLOSURE_CLEARCOAT 3480 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 3481 accumulate_light(C_spec, 1.0, C_spec_accum); 3482 # endif 3483 } 3484 #endif 3485 3486 #ifdef CLOSURE_REFRACTION 3487 if (refr_accum.a < 0.999) { 3488 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 3489 accumulate_light(trans, 1.0, refr_accum); 3490 } 3491 #endif 3492 #endif /* Specular probes */ 3493 3494 /* ---------------------------- */ 3495 /* Ambient Occlusion */ 3496 /* ---------------------------- */ 3497 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 3498 vec3 bent_normal; 3499 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 3500 #endif 3501 3502 /* ---------------------------- */ 3503 /* Specular Output */ 3504 /* ---------------------------- */ 3505 float NV = dot(N, V); 3506 #ifdef CLOSURE_GLOSSY 3507 vec2 uv = lut_coords(NV, roughness); 3508 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 3509 3510 /* This factor is outputted to be used by SSR in order 3511 * to match the intensity of the regular reflections. */ 3512 ssr_spec = F_ibl(f0, brdf_lut); 3513 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 3514 3515 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 3516 if (ssrToggle && ssr_id == outputSsrId) { 3517 spec_occlu = 1.0; 3518 } 3519 3520 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 3521 #endif 3522 3523 #ifdef CLOSURE_REFRACTION 3524 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 3525 3526 out_refr += refr_accum.rgb * btdf; 3527 #endif 3528 3529 #ifdef CLOSURE_CLEARCOAT 3530 NV = dot(C_N, V); 3531 vec2 C_uv = lut_coords(NV, C_roughness); 3532 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 3533 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 3534 3535 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 3536 #endif 3537 3538 #ifdef CLOSURE_GLOSSY 3539 /* Global toggle for lightprobe baking. */ 3540 out_spec *= float(specToggle); 3541 #endif 3542 3543 /* ---------------------------------------------------------------- */ 3544 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 3545 /* ---------------------------------------------------------------- */ 3546 3547 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 3548 #ifdef CLOSURE_DIFFUSE 3549 vec4 diff_accum = vec4(0.0); 3550 3551 /* ---------------------------- */ 3552 /* Irradiance Grids */ 3553 /* ---------------------------- */ 3554 /* Start at 1 because 0 is world irradiance */ 3555 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 3556 GridData gd = grids_data[i]; 3557 3558 vec3 localpos; 3559 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 3560 3561 if (fade > 0.0) { 3562 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 3563 accumulate_light(diff, fade, diff_accum); 3564 } 3565 } 3566 3567 /* ---------------------------- */ 3568 /* World Diffuse */ 3569 /* ---------------------------- */ 3570 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 3571 vec3 diff = probe_evaluate_world_diff(bent_normal); 3572 accumulate_light(diff, 1.0, diff_accum); 3573 } 3574 3575 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 3576 #endif 3577 } 3578 3579 /* Cleanup for next configuration */ 3580 #undef CLOSURE_NAME 3581 3582 #ifdef CLOSURE_DIFFUSE 3583 #undef CLOSURE_DIFFUSE 3584 #endif 3585 3586 #ifdef CLOSURE_GLOSSY 3587 #undef CLOSURE_GLOSSY 3588 #endif 3589 3590 #ifdef CLOSURE_CLEARCOAT 3591 #undef CLOSURE_CLEARCOAT 3592 #endif 3593 3594 #ifdef CLOSURE_REFRACTION 3595 #undef CLOSURE_REFRACTION 3596 #endif 3597 3598 #ifdef CLOSURE_SUBSURFACE 3599 #undef CLOSURE_SUBSURFACE 3600 #endif 3601 3602 #ifndef LIT_SURFACE_UNIFORM 3603 #define LIT_SURFACE_UNIFORM 3604 3605 uniform float refractionDepth; 3606 3607 #ifndef UTIL_TEX 3608 # define UTIL_TEX 3609 uniform sampler2DArray utilTex; 3610 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 3611 #endif /* UTIL_TEX */ 3612 3613 in vec3 worldPosition; 3614 in vec3 viewPosition; 3615 3616 #ifdef USE_FLAT_NORMAL 3617 flat in vec3 worldNormal; 3618 flat in vec3 viewNormal; 3619 #else 3620 in vec3 worldNormal; 3621 in vec3 viewNormal; 3622 #endif 3623 3624 #ifdef HAIR_SHADER 3625 in vec3 hairTangent; /* world space */ 3626 in float hairThickTime; 3627 in float hairThickness; 3628 in float hairTime; 3629 flat in int hairStrandID; 3630 3631 uniform int hairThicknessRes = 1; 3632 #endif 3633 3634 #endif /* LIT_SURFACE_UNIFORM */ 3635 3636 /** AUTO CONFIG 3637 * We include the file multiple times each time with a different configuration. 3638 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 3639 */ 3640 #if !defined(SURFACE_DEFAULT) 3641 #define SURFACE_DEFAULT 3642 #define CLOSURE_NAME eevee_closure_default 3643 #define CLOSURE_DIFFUSE 3644 #define CLOSURE_GLOSSY 3645 #endif /* SURFACE_DEFAULT */ 3646 3647 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 3648 #define SURFACE_PRINCIPLED 3649 #define CLOSURE_NAME eevee_closure_principled 3650 #define CLOSURE_DIFFUSE 3651 #define CLOSURE_GLOSSY 3652 #define CLOSURE_CLEARCOAT 3653 #define CLOSURE_REFRACTION 3654 #define CLOSURE_SUBSURFACE 3655 #endif /* SURFACE_PRINCIPLED */ 3656 3657 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 3658 #define SURFACE_CLEARCOAT 3659 #define CLOSURE_NAME eevee_closure_clearcoat 3660 #define CLOSURE_GLOSSY 3661 #define CLOSURE_CLEARCOAT 3662 #endif /* SURFACE_CLEARCOAT */ 3663 3664 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 3665 #define SURFACE_DIFFUSE 3666 #define CLOSURE_NAME eevee_closure_diffuse 3667 #define CLOSURE_DIFFUSE 3668 #endif /* SURFACE_DIFFUSE */ 3669 3670 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 3671 #define SURFACE_SUBSURFACE 3672 #define CLOSURE_NAME eevee_closure_subsurface 3673 #define CLOSURE_DIFFUSE 3674 #define CLOSURE_SUBSURFACE 3675 #endif /* SURFACE_SUBSURFACE */ 3676 3677 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 3678 #define SURFACE_SKIN 3679 #define CLOSURE_NAME eevee_closure_skin 3680 #define CLOSURE_DIFFUSE 3681 #define CLOSURE_SUBSURFACE 3682 #define CLOSURE_GLOSSY 3683 #endif /* SURFACE_SKIN */ 3684 3685 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 3686 #define SURFACE_GLOSSY 3687 #define CLOSURE_NAME eevee_closure_glossy 3688 #define CLOSURE_GLOSSY 3689 #endif /* SURFACE_GLOSSY */ 3690 3691 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 3692 #define SURFACE_REFRACT 3693 #define CLOSURE_NAME eevee_closure_refraction 3694 #define CLOSURE_REFRACTION 3695 #endif /* SURFACE_REFRACT */ 3696 3697 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 3698 #define SURFACE_GLASS 3699 #define CLOSURE_NAME eevee_closure_glass 3700 #define CLOSURE_GLOSSY 3701 #define CLOSURE_REFRACTION 3702 #endif /* SURFACE_GLASS */ 3703 3704 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 3705 #ifdef CLOSURE_CLEARCOAT 3706 #ifndef CLOSURE_GLOSSY 3707 # define CLOSURE_GLOSSY 3708 #endif 3709 #endif /* CLOSURE_CLEARCOAT */ 3710 3711 void CLOSURE_NAME(vec3 N 3712 #ifdef CLOSURE_DIFFUSE 3713 , 3714 vec3 albedo 3715 #endif 3716 #ifdef CLOSURE_GLOSSY 3717 , 3718 vec3 f0, 3719 int ssr_id 3720 #endif 3721 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3722 , 3723 float roughness 3724 #endif 3725 #ifdef CLOSURE_CLEARCOAT 3726 , 3727 vec3 C_N, 3728 float C_intensity, 3729 float C_roughness 3730 #endif 3731 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 3732 , 3733 float ao 3734 #endif 3735 #ifdef CLOSURE_SUBSURFACE 3736 , 3737 float sss_scale 3738 #endif 3739 #ifdef CLOSURE_REFRACTION 3740 , 3741 float ior 3742 #endif 3743 #ifdef CLOSURE_DIFFUSE 3744 , 3745 out vec3 out_diff 3746 #endif 3747 #ifdef CLOSURE_SUBSURFACE 3748 , 3749 out vec3 out_trans 3750 #endif 3751 #ifdef CLOSURE_GLOSSY 3752 , 3753 out vec3 out_spec 3754 #endif 3755 #ifdef CLOSURE_REFRACTION 3756 , 3757 out vec3 out_refr 3758 #endif 3759 #ifdef CLOSURE_GLOSSY 3760 , 3761 out vec3 ssr_spec 3762 #endif 3763 ) 3764 { 3765 #ifdef CLOSURE_DIFFUSE 3766 out_diff = vec3(0.0); 3767 #endif 3768 3769 #ifdef CLOSURE_SUBSURFACE 3770 out_trans = vec3(0.0); 3771 #endif 3772 3773 #ifdef CLOSURE_GLOSSY 3774 out_spec = vec3(0.0); 3775 #endif 3776 3777 #ifdef CLOSURE_REFRACTION 3778 out_refr = vec3(0.0); 3779 #endif 3780 3781 #ifdef SHADOW_SHADER 3782 return; 3783 #endif 3784 3785 /* Zero length vectors cause issues, see: T51979. */ 3786 float len = length(N); 3787 if (isnan(len)) { 3788 return; 3789 } 3790 N /= len; 3791 3792 #ifdef CLOSURE_CLEARCOAT 3793 len = length(C_N); 3794 if (isnan(len)) { 3795 return; 3796 } 3797 C_N /= len; 3798 #endif 3799 3800 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3801 roughness = clamp(roughness, 1e-8, 0.9999); 3802 float roughnessSquared = roughness * roughness; 3803 #endif 3804 3805 #ifdef CLOSURE_CLEARCOAT 3806 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 3807 float C_roughnessSquared = C_roughness * C_roughness; 3808 #endif 3809 3810 vec3 V = cameraVec; 3811 3812 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 3813 3814 /* ---------------------------------------------------------------- */ 3815 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 3816 /* ---------------------------------------------------------------- */ 3817 3818 #ifdef CLOSURE_GLOSSY 3819 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 3820 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 3821 #endif 3822 3823 #ifdef CLOSURE_CLEARCOAT 3824 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 3825 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 3826 vec3 out_spec_clear = vec3(0.0); 3827 #endif 3828 3829 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 3830 LightData ld = lights_data[i]; 3831 3832 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 3833 l_vector.xyz = ld.l_position - worldPosition; 3834 l_vector.w = length(l_vector.xyz); 3835 3836 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 3837 3838 if (l_vis < 1e-8) { 3839 continue; 3840 } 3841 3842 vec3 l_color_vis = ld.l_color * l_vis; 3843 3844 #ifdef CLOSURE_DIFFUSE 3845 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 3846 #endif 3847 3848 #ifdef CLOSURE_SUBSURFACE 3849 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 3850 #endif 3851 3852 #ifdef CLOSURE_GLOSSY 3853 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 3854 #endif 3855 3856 #ifdef CLOSURE_CLEARCOAT 3857 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 3858 ld.l_spec; 3859 #endif 3860 } 3861 3862 #ifdef CLOSURE_GLOSSY 3863 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 3864 out_spec *= F_area(f0, brdf_lut_lights.xy); 3865 #endif 3866 3867 #ifdef CLOSURE_CLEARCOAT 3868 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 3869 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 3870 out_spec += out_spec_clear * C_intensity; 3871 #endif 3872 3873 /* ---------------------------------------------------------------- */ 3874 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 3875 /* ---------------------------------------------------------------- */ 3876 3877 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 3878 #ifdef CLOSURE_GLOSSY 3879 vec4 spec_accum = vec4(0.0); 3880 #endif 3881 3882 #ifdef CLOSURE_CLEARCOAT 3883 vec4 C_spec_accum = vec4(0.0); 3884 #endif 3885 3886 #ifdef CLOSURE_REFRACTION 3887 vec4 refr_accum = vec4(0.0); 3888 #endif 3889 3890 #ifdef CLOSURE_GLOSSY 3891 /* ---------------------------- */ 3892 /* Planar Reflections */ 3893 /* ---------------------------- */ 3894 3895 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 3896 PlanarData pd = planars_data[i]; 3897 3898 /* Fade on geometric normal. */ 3899 float fade = probe_attenuation_planar( 3900 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 3901 3902 if (fade > 0.0) { 3903 if (!(ssrToggle && ssr_id == outputSsrId)) { 3904 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 3905 accumulate_light(spec, fade, spec_accum); 3906 } 3907 3908 #ifdef CLOSURE_CLEARCOAT 3909 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 3910 accumulate_light(C_spec, fade, C_spec_accum); 3911 #endif 3912 } 3913 } 3914 #endif 3915 3916 #ifdef CLOSURE_GLOSSY 3917 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 3918 #endif 3919 3920 #ifdef CLOSURE_CLEARCOAT 3921 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 3922 #endif 3923 3924 #ifdef CLOSURE_REFRACTION 3925 /* Refract the view vector using the depth heuristic. 3926 * Then later Refract a second time the already refracted 3927 * ray using the inverse ior. */ 3928 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 3929 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 3930 vec3 refr_pos = (refractionDepth > 0.0) ? 3931 line_plane_intersect( 3932 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 3933 worldPosition; 3934 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 3935 #endif 3936 3937 #ifdef CLOSURE_REFRACTION 3938 /* ---------------------------- */ 3939 /* Screen Space Refraction */ 3940 /* ---------------------------- */ 3941 #ifdef USE_REFRACTION 3942 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 3943 /* Find approximated position of the 2nd refraction event. */ 3944 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 3945 viewPosition; 3946 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 3947 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 3948 accumulate_light(trans.rgb, trans.a, refr_accum); 3949 } 3950 #endif 3951 3952 #endif 3953 3954 /* ---------------------------- */ 3955 /* Specular probes */ 3956 /* ---------------------------- */ 3957 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3958 3959 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 3960 # define GLASS_ACCUM 1 3961 # define ACCUM min(refr_accum.a, spec_accum.a) 3962 #elif defined(CLOSURE_REFRACTION) 3963 # define GLASS_ACCUM 0 3964 # define ACCUM refr_accum.a 3965 #else 3966 # define GLASS_ACCUM 0 3967 # define ACCUM spec_accum.a 3968 #endif 3969 3970 /* Starts at 1 because 0 is world probe */ 3971 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 3972 float fade = probe_attenuation_cube(i, worldPosition); 3973 3974 if (fade > 0.0) { 3975 3976 #if GLASS_ACCUM 3977 if (spec_accum.a < 0.999) { 3978 #endif 3979 #ifdef CLOSURE_GLOSSY 3980 if (!(ssrToggle && ssr_id == outputSsrId)) { 3981 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 3982 accumulate_light(spec, fade, spec_accum); 3983 } 3984 #endif 3985 3986 #ifdef CLOSURE_CLEARCOAT 3987 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 3988 accumulate_light(C_spec, fade, C_spec_accum); 3989 #endif 3990 #if GLASS_ACCUM 3991 } 3992 #endif 3993 3994 #if GLASS_ACCUM 3995 if (refr_accum.a < 0.999) { 3996 #endif 3997 #ifdef CLOSURE_REFRACTION 3998 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 3999 accumulate_light(trans, fade, refr_accum); 4000 #endif 4001 #if GLASS_ACCUM 4002 } 4003 #endif 4004 } 4005 } 4006 4007 #undef GLASS_ACCUM 4008 #undef ACCUM 4009 4010 /* ---------------------------- */ 4011 /* World Probe */ 4012 /* ---------------------------- */ 4013 #ifdef CLOSURE_GLOSSY 4014 if (spec_accum.a < 0.999) { 4015 if (!(ssrToggle && ssr_id == outputSsrId)) { 4016 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 4017 accumulate_light(spec, 1.0, spec_accum); 4018 } 4019 4020 # ifdef CLOSURE_CLEARCOAT 4021 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 4022 accumulate_light(C_spec, 1.0, C_spec_accum); 4023 # endif 4024 } 4025 #endif 4026 4027 #ifdef CLOSURE_REFRACTION 4028 if (refr_accum.a < 0.999) { 4029 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 4030 accumulate_light(trans, 1.0, refr_accum); 4031 } 4032 #endif 4033 #endif /* Specular probes */ 4034 4035 /* ---------------------------- */ 4036 /* Ambient Occlusion */ 4037 /* ---------------------------- */ 4038 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 4039 vec3 bent_normal; 4040 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 4041 #endif 4042 4043 /* ---------------------------- */ 4044 /* Specular Output */ 4045 /* ---------------------------- */ 4046 float NV = dot(N, V); 4047 #ifdef CLOSURE_GLOSSY 4048 vec2 uv = lut_coords(NV, roughness); 4049 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 4050 4051 /* This factor is outputted to be used by SSR in order 4052 * to match the intensity of the regular reflections. */ 4053 ssr_spec = F_ibl(f0, brdf_lut); 4054 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 4055 4056 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 4057 if (ssrToggle && ssr_id == outputSsrId) { 4058 spec_occlu = 1.0; 4059 } 4060 4061 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 4062 #endif 4063 4064 #ifdef CLOSURE_REFRACTION 4065 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 4066 4067 out_refr += refr_accum.rgb * btdf; 4068 #endif 4069 4070 #ifdef CLOSURE_CLEARCOAT 4071 NV = dot(C_N, V); 4072 vec2 C_uv = lut_coords(NV, C_roughness); 4073 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 4074 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 4075 4076 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 4077 #endif 4078 4079 #ifdef CLOSURE_GLOSSY 4080 /* Global toggle for lightprobe baking. */ 4081 out_spec *= float(specToggle); 4082 #endif 4083 4084 /* ---------------------------------------------------------------- */ 4085 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 4086 /* ---------------------------------------------------------------- */ 4087 4088 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 4089 #ifdef CLOSURE_DIFFUSE 4090 vec4 diff_accum = vec4(0.0); 4091 4092 /* ---------------------------- */ 4093 /* Irradiance Grids */ 4094 /* ---------------------------- */ 4095 /* Start at 1 because 0 is world irradiance */ 4096 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 4097 GridData gd = grids_data[i]; 4098 4099 vec3 localpos; 4100 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 4101 4102 if (fade > 0.0) { 4103 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 4104 accumulate_light(diff, fade, diff_accum); 4105 } 4106 } 4107 4108 /* ---------------------------- */ 4109 /* World Diffuse */ 4110 /* ---------------------------- */ 4111 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 4112 vec3 diff = probe_evaluate_world_diff(bent_normal); 4113 accumulate_light(diff, 1.0, diff_accum); 4114 } 4115 4116 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 4117 #endif 4118 } 4119 4120 /* Cleanup for next configuration */ 4121 #undef CLOSURE_NAME 4122 4123 #ifdef CLOSURE_DIFFUSE 4124 #undef CLOSURE_DIFFUSE 4125 #endif 4126 4127 #ifdef CLOSURE_GLOSSY 4128 #undef CLOSURE_GLOSSY 4129 #endif 4130 4131 #ifdef CLOSURE_CLEARCOAT 4132 #undef CLOSURE_CLEARCOAT 4133 #endif 4134 4135 #ifdef CLOSURE_REFRACTION 4136 #undef CLOSURE_REFRACTION 4137 #endif 4138 4139 #ifdef CLOSURE_SUBSURFACE 4140 #undef CLOSURE_SUBSURFACE 4141 #endif 4142 4143 #ifndef LIT_SURFACE_UNIFORM 4144 #define LIT_SURFACE_UNIFORM 4145 4146 uniform float refractionDepth; 4147 4148 #ifndef UTIL_TEX 4149 # define UTIL_TEX 4150 uniform sampler2DArray utilTex; 4151 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 4152 #endif /* UTIL_TEX */ 4153 4154 in vec3 worldPosition; 4155 in vec3 viewPosition; 4156 4157 #ifdef USE_FLAT_NORMAL 4158 flat in vec3 worldNormal; 4159 flat in vec3 viewNormal; 4160 #else 4161 in vec3 worldNormal; 4162 in vec3 viewNormal; 4163 #endif 4164 4165 #ifdef HAIR_SHADER 4166 in vec3 hairTangent; /* world space */ 4167 in float hairThickTime; 4168 in float hairThickness; 4169 in float hairTime; 4170 flat in int hairStrandID; 4171 4172 uniform int hairThicknessRes = 1; 4173 #endif 4174 4175 #endif /* LIT_SURFACE_UNIFORM */ 4176 4177 /** AUTO CONFIG 4178 * We include the file multiple times each time with a different configuration. 4179 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 4180 */ 4181 #if !defined(SURFACE_DEFAULT) 4182 #define SURFACE_DEFAULT 4183 #define CLOSURE_NAME eevee_closure_default 4184 #define CLOSURE_DIFFUSE 4185 #define CLOSURE_GLOSSY 4186 #endif /* SURFACE_DEFAULT */ 4187 4188 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 4189 #define SURFACE_PRINCIPLED 4190 #define CLOSURE_NAME eevee_closure_principled 4191 #define CLOSURE_DIFFUSE 4192 #define CLOSURE_GLOSSY 4193 #define CLOSURE_CLEARCOAT 4194 #define CLOSURE_REFRACTION 4195 #define CLOSURE_SUBSURFACE 4196 #endif /* SURFACE_PRINCIPLED */ 4197 4198 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 4199 #define SURFACE_CLEARCOAT 4200 #define CLOSURE_NAME eevee_closure_clearcoat 4201 #define CLOSURE_GLOSSY 4202 #define CLOSURE_CLEARCOAT 4203 #endif /* SURFACE_CLEARCOAT */ 4204 4205 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 4206 #define SURFACE_DIFFUSE 4207 #define CLOSURE_NAME eevee_closure_diffuse 4208 #define CLOSURE_DIFFUSE 4209 #endif /* SURFACE_DIFFUSE */ 4210 4211 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 4212 #define SURFACE_SUBSURFACE 4213 #define CLOSURE_NAME eevee_closure_subsurface 4214 #define CLOSURE_DIFFUSE 4215 #define CLOSURE_SUBSURFACE 4216 #endif /* SURFACE_SUBSURFACE */ 4217 4218 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 4219 #define SURFACE_SKIN 4220 #define CLOSURE_NAME eevee_closure_skin 4221 #define CLOSURE_DIFFUSE 4222 #define CLOSURE_SUBSURFACE 4223 #define CLOSURE_GLOSSY 4224 #endif /* SURFACE_SKIN */ 4225 4226 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 4227 #define SURFACE_GLOSSY 4228 #define CLOSURE_NAME eevee_closure_glossy 4229 #define CLOSURE_GLOSSY 4230 #endif /* SURFACE_GLOSSY */ 4231 4232 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 4233 #define SURFACE_REFRACT 4234 #define CLOSURE_NAME eevee_closure_refraction 4235 #define CLOSURE_REFRACTION 4236 #endif /* SURFACE_REFRACT */ 4237 4238 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 4239 #define SURFACE_GLASS 4240 #define CLOSURE_NAME eevee_closure_glass 4241 #define CLOSURE_GLOSSY 4242 #define CLOSURE_REFRACTION 4243 #endif /* SURFACE_GLASS */ 4244 4245 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 4246 #ifdef CLOSURE_CLEARCOAT 4247 #ifndef CLOSURE_GLOSSY 4248 # define CLOSURE_GLOSSY 4249 #endif 4250 #endif /* CLOSURE_CLEARCOAT */ 4251 4252 void CLOSURE_NAME(vec3 N 4253 #ifdef CLOSURE_DIFFUSE 4254 , 4255 vec3 albedo 4256 #endif 4257 #ifdef CLOSURE_GLOSSY 4258 , 4259 vec3 f0, 4260 int ssr_id 4261 #endif 4262 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4263 , 4264 float roughness 4265 #endif 4266 #ifdef CLOSURE_CLEARCOAT 4267 , 4268 vec3 C_N, 4269 float C_intensity, 4270 float C_roughness 4271 #endif 4272 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 4273 , 4274 float ao 4275 #endif 4276 #ifdef CLOSURE_SUBSURFACE 4277 , 4278 float sss_scale 4279 #endif 4280 #ifdef CLOSURE_REFRACTION 4281 , 4282 float ior 4283 #endif 4284 #ifdef CLOSURE_DIFFUSE 4285 , 4286 out vec3 out_diff 4287 #endif 4288 #ifdef CLOSURE_SUBSURFACE 4289 , 4290 out vec3 out_trans 4291 #endif 4292 #ifdef CLOSURE_GLOSSY 4293 , 4294 out vec3 out_spec 4295 #endif 4296 #ifdef CLOSURE_REFRACTION 4297 , 4298 out vec3 out_refr 4299 #endif 4300 #ifdef CLOSURE_GLOSSY 4301 , 4302 out vec3 ssr_spec 4303 #endif 4304 ) 4305 { 4306 #ifdef CLOSURE_DIFFUSE 4307 out_diff = vec3(0.0); 4308 #endif 4309 4310 #ifdef CLOSURE_SUBSURFACE 4311 out_trans = vec3(0.0); 4312 #endif 4313 4314 #ifdef CLOSURE_GLOSSY 4315 out_spec = vec3(0.0); 4316 #endif 4317 4318 #ifdef CLOSURE_REFRACTION 4319 out_refr = vec3(0.0); 4320 #endif 4321 4322 #ifdef SHADOW_SHADER 4323 return; 4324 #endif 4325 4326 /* Zero length vectors cause issues, see: T51979. */ 4327 float len = length(N); 4328 if (isnan(len)) { 4329 return; 4330 } 4331 N /= len; 4332 4333 #ifdef CLOSURE_CLEARCOAT 4334 len = length(C_N); 4335 if (isnan(len)) { 4336 return; 4337 } 4338 C_N /= len; 4339 #endif 4340 4341 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4342 roughness = clamp(roughness, 1e-8, 0.9999); 4343 float roughnessSquared = roughness * roughness; 4344 #endif 4345 4346 #ifdef CLOSURE_CLEARCOAT 4347 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 4348 float C_roughnessSquared = C_roughness * C_roughness; 4349 #endif 4350 4351 vec3 V = cameraVec; 4352 4353 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 4354 4355 /* ---------------------------------------------------------------- */ 4356 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 4357 /* ---------------------------------------------------------------- */ 4358 4359 #ifdef CLOSURE_GLOSSY 4360 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 4361 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 4362 #endif 4363 4364 #ifdef CLOSURE_CLEARCOAT 4365 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 4366 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 4367 vec3 out_spec_clear = vec3(0.0); 4368 #endif 4369 4370 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 4371 LightData ld = lights_data[i]; 4372 4373 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 4374 l_vector.xyz = ld.l_position - worldPosition; 4375 l_vector.w = length(l_vector.xyz); 4376 4377 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 4378 4379 if (l_vis < 1e-8) { 4380 continue; 4381 } 4382 4383 vec3 l_color_vis = ld.l_color * l_vis; 4384 4385 #ifdef CLOSURE_DIFFUSE 4386 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 4387 #endif 4388 4389 #ifdef CLOSURE_SUBSURFACE 4390 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 4391 #endif 4392 4393 #ifdef CLOSURE_GLOSSY 4394 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 4395 #endif 4396 4397 #ifdef CLOSURE_CLEARCOAT 4398 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 4399 ld.l_spec; 4400 #endif 4401 } 4402 4403 #ifdef CLOSURE_GLOSSY 4404 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 4405 out_spec *= F_area(f0, brdf_lut_lights.xy); 4406 #endif 4407 4408 #ifdef CLOSURE_CLEARCOAT 4409 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 4410 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 4411 out_spec += out_spec_clear * C_intensity; 4412 #endif 4413 4414 /* ---------------------------------------------------------------- */ 4415 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 4416 /* ---------------------------------------------------------------- */ 4417 4418 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 4419 #ifdef CLOSURE_GLOSSY 4420 vec4 spec_accum = vec4(0.0); 4421 #endif 4422 4423 #ifdef CLOSURE_CLEARCOAT 4424 vec4 C_spec_accum = vec4(0.0); 4425 #endif 4426 4427 #ifdef CLOSURE_REFRACTION 4428 vec4 refr_accum = vec4(0.0); 4429 #endif 4430 4431 #ifdef CLOSURE_GLOSSY 4432 /* ---------------------------- */ 4433 /* Planar Reflections */ 4434 /* ---------------------------- */ 4435 4436 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 4437 PlanarData pd = planars_data[i]; 4438 4439 /* Fade on geometric normal. */ 4440 float fade = probe_attenuation_planar( 4441 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 4442 4443 if (fade > 0.0) { 4444 if (!(ssrToggle && ssr_id == outputSsrId)) { 4445 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 4446 accumulate_light(spec, fade, spec_accum); 4447 } 4448 4449 #ifdef CLOSURE_CLEARCOAT 4450 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 4451 accumulate_light(C_spec, fade, C_spec_accum); 4452 #endif 4453 } 4454 } 4455 #endif 4456 4457 #ifdef CLOSURE_GLOSSY 4458 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 4459 #endif 4460 4461 #ifdef CLOSURE_CLEARCOAT 4462 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 4463 #endif 4464 4465 #ifdef CLOSURE_REFRACTION 4466 /* Refract the view vector using the depth heuristic. 4467 * Then later Refract a second time the already refracted 4468 * ray using the inverse ior. */ 4469 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 4470 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 4471 vec3 refr_pos = (refractionDepth > 0.0) ? 4472 line_plane_intersect( 4473 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 4474 worldPosition; 4475 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 4476 #endif 4477 4478 #ifdef CLOSURE_REFRACTION 4479 /* ---------------------------- */ 4480 /* Screen Space Refraction */ 4481 /* ---------------------------- */ 4482 #ifdef USE_REFRACTION 4483 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 4484 /* Find approximated position of the 2nd refraction event. */ 4485 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 4486 viewPosition; 4487 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 4488 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 4489 accumulate_light(trans.rgb, trans.a, refr_accum); 4490 } 4491 #endif 4492 4493 #endif 4494 4495 /* ---------------------------- */ 4496 /* Specular probes */ 4497 /* ---------------------------- */ 4498 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4499 4500 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 4501 # define GLASS_ACCUM 1 4502 # define ACCUM min(refr_accum.a, spec_accum.a) 4503 #elif defined(CLOSURE_REFRACTION) 4504 # define GLASS_ACCUM 0 4505 # define ACCUM refr_accum.a 4506 #else 4507 # define GLASS_ACCUM 0 4508 # define ACCUM spec_accum.a 4509 #endif 4510 4511 /* Starts at 1 because 0 is world probe */ 4512 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 4513 float fade = probe_attenuation_cube(i, worldPosition); 4514 4515 if (fade > 0.0) { 4516 4517 #if GLASS_ACCUM 4518 if (spec_accum.a < 0.999) { 4519 #endif 4520 #ifdef CLOSURE_GLOSSY 4521 if (!(ssrToggle && ssr_id == outputSsrId)) { 4522 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 4523 accumulate_light(spec, fade, spec_accum); 4524 } 4525 #endif 4526 4527 #ifdef CLOSURE_CLEARCOAT 4528 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 4529 accumulate_light(C_spec, fade, C_spec_accum); 4530 #endif 4531 #if GLASS_ACCUM 4532 } 4533 #endif 4534 4535 #if GLASS_ACCUM 4536 if (refr_accum.a < 0.999) { 4537 #endif 4538 #ifdef CLOSURE_REFRACTION 4539 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 4540 accumulate_light(trans, fade, refr_accum); 4541 #endif 4542 #if GLASS_ACCUM 4543 } 4544 #endif 4545 } 4546 } 4547 4548 #undef GLASS_ACCUM 4549 #undef ACCUM 4550 4551 /* ---------------------------- */ 4552 /* World Probe */ 4553 /* ---------------------------- */ 4554 #ifdef CLOSURE_GLOSSY 4555 if (spec_accum.a < 0.999) { 4556 if (!(ssrToggle && ssr_id == outputSsrId)) { 4557 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 4558 accumulate_light(spec, 1.0, spec_accum); 4559 } 4560 4561 # ifdef CLOSURE_CLEARCOAT 4562 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 4563 accumulate_light(C_spec, 1.0, C_spec_accum); 4564 # endif 4565 } 4566 #endif 4567 4568 #ifdef CLOSURE_REFRACTION 4569 if (refr_accum.a < 0.999) { 4570 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 4571 accumulate_light(trans, 1.0, refr_accum); 4572 } 4573 #endif 4574 #endif /* Specular probes */ 4575 4576 /* ---------------------------- */ 4577 /* Ambient Occlusion */ 4578 /* ---------------------------- */ 4579 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 4580 vec3 bent_normal; 4581 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 4582 #endif 4583 4584 /* ---------------------------- */ 4585 /* Specular Output */ 4586 /* ---------------------------- */ 4587 float NV = dot(N, V); 4588 #ifdef CLOSURE_GLOSSY 4589 vec2 uv = lut_coords(NV, roughness); 4590 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 4591 4592 /* This factor is outputted to be used by SSR in order 4593 * to match the intensity of the regular reflections. */ 4594 ssr_spec = F_ibl(f0, brdf_lut); 4595 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 4596 4597 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 4598 if (ssrToggle && ssr_id == outputSsrId) { 4599 spec_occlu = 1.0; 4600 } 4601 4602 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 4603 #endif 4604 4605 #ifdef CLOSURE_REFRACTION 4606 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 4607 4608 out_refr += refr_accum.rgb * btdf; 4609 #endif 4610 4611 #ifdef CLOSURE_CLEARCOAT 4612 NV = dot(C_N, V); 4613 vec2 C_uv = lut_coords(NV, C_roughness); 4614 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 4615 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 4616 4617 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 4618 #endif 4619 4620 #ifdef CLOSURE_GLOSSY 4621 /* Global toggle for lightprobe baking. */ 4622 out_spec *= float(specToggle); 4623 #endif 4624 4625 /* ---------------------------------------------------------------- */ 4626 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 4627 /* ---------------------------------------------------------------- */ 4628 4629 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 4630 #ifdef CLOSURE_DIFFUSE 4631 vec4 diff_accum = vec4(0.0); 4632 4633 /* ---------------------------- */ 4634 /* Irradiance Grids */ 4635 /* ---------------------------- */ 4636 /* Start at 1 because 0 is world irradiance */ 4637 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 4638 GridData gd = grids_data[i]; 4639 4640 vec3 localpos; 4641 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 4642 4643 if (fade > 0.0) { 4644 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 4645 accumulate_light(diff, fade, diff_accum); 4646 } 4647 } 4648 4649 /* ---------------------------- */ 4650 /* World Diffuse */ 4651 /* ---------------------------- */ 4652 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 4653 vec3 diff = probe_evaluate_world_diff(bent_normal); 4654 accumulate_light(diff, 1.0, diff_accum); 4655 } 4656 4657 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 4658 #endif 4659 } 4660 4661 /* Cleanup for next configuration */ 4662 #undef CLOSURE_NAME 4663 4664 #ifdef CLOSURE_DIFFUSE 4665 #undef CLOSURE_DIFFUSE 4666 #endif 4667 4668 #ifdef CLOSURE_GLOSSY 4669 #undef CLOSURE_GLOSSY 4670 #endif 4671 4672 #ifdef CLOSURE_CLEARCOAT 4673 #undef CLOSURE_CLEARCOAT 4674 #endif 4675 4676 #ifdef CLOSURE_REFRACTION 4677 #undef CLOSURE_REFRACTION 4678 #endif 4679 4680 #ifdef CLOSURE_SUBSURFACE 4681 #undef CLOSURE_SUBSURFACE 4682 #endif 4683 4684 #ifndef LIT_SURFACE_UNIFORM 4685 #define LIT_SURFACE_UNIFORM 4686 4687 uniform float refractionDepth; 4688 4689 #ifndef UTIL_TEX 4690 # define UTIL_TEX 4691 uniform sampler2DArray utilTex; 4692 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 4693 #endif /* UTIL_TEX */ 4694 4695 in vec3 worldPosition; 4696 in vec3 viewPosition; 4697 4698 #ifdef USE_FLAT_NORMAL 4699 flat in vec3 worldNormal; 4700 flat in vec3 viewNormal; 4701 #else 4702 in vec3 worldNormal; 4703 in vec3 viewNormal; 4704 #endif 4705 4706 #ifdef HAIR_SHADER 4707 in vec3 hairTangent; /* world space */ 4708 in float hairThickTime; 4709 in float hairThickness; 4710 in float hairTime; 4711 flat in int hairStrandID; 4712 4713 uniform int hairThicknessRes = 1; 4714 #endif 4715 4716 #endif /* LIT_SURFACE_UNIFORM */ 4717 4718 /** AUTO CONFIG 4719 * We include the file multiple times each time with a different configuration. 4720 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 4721 */ 4722 #if !defined(SURFACE_DEFAULT) 4723 #define SURFACE_DEFAULT 4724 #define CLOSURE_NAME eevee_closure_default 4725 #define CLOSURE_DIFFUSE 4726 #define CLOSURE_GLOSSY 4727 #endif /* SURFACE_DEFAULT */ 4728 4729 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 4730 #define SURFACE_PRINCIPLED 4731 #define CLOSURE_NAME eevee_closure_principled 4732 #define CLOSURE_DIFFUSE 4733 #define CLOSURE_GLOSSY 4734 #define CLOSURE_CLEARCOAT 4735 #define CLOSURE_REFRACTION 4736 #define CLOSURE_SUBSURFACE 4737 #endif /* SURFACE_PRINCIPLED */ 4738 4739 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 4740 #define SURFACE_CLEARCOAT 4741 #define CLOSURE_NAME eevee_closure_clearcoat 4742 #define CLOSURE_GLOSSY 4743 #define CLOSURE_CLEARCOAT 4744 #endif /* SURFACE_CLEARCOAT */ 4745 4746 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 4747 #define SURFACE_DIFFUSE 4748 #define CLOSURE_NAME eevee_closure_diffuse 4749 #define CLOSURE_DIFFUSE 4750 #endif /* SURFACE_DIFFUSE */ 4751 4752 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 4753 #define SURFACE_SUBSURFACE 4754 #define CLOSURE_NAME eevee_closure_subsurface 4755 #define CLOSURE_DIFFUSE 4756 #define CLOSURE_SUBSURFACE 4757 #endif /* SURFACE_SUBSURFACE */ 4758 4759 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 4760 #define SURFACE_SKIN 4761 #define CLOSURE_NAME eevee_closure_skin 4762 #define CLOSURE_DIFFUSE 4763 #define CLOSURE_SUBSURFACE 4764 #define CLOSURE_GLOSSY 4765 #endif /* SURFACE_SKIN */ 4766 4767 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 4768 #define SURFACE_GLOSSY 4769 #define CLOSURE_NAME eevee_closure_glossy 4770 #define CLOSURE_GLOSSY 4771 #endif /* SURFACE_GLOSSY */ 4772 4773 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 4774 #define SURFACE_REFRACT 4775 #define CLOSURE_NAME eevee_closure_refraction 4776 #define CLOSURE_REFRACTION 4777 #endif /* SURFACE_REFRACT */ 4778 4779 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 4780 #define SURFACE_GLASS 4781 #define CLOSURE_NAME eevee_closure_glass 4782 #define CLOSURE_GLOSSY 4783 #define CLOSURE_REFRACTION 4784 #endif /* SURFACE_GLASS */ 4785 4786 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 4787 #ifdef CLOSURE_CLEARCOAT 4788 #ifndef CLOSURE_GLOSSY 4789 # define CLOSURE_GLOSSY 4790 #endif 4791 #endif /* CLOSURE_CLEARCOAT */ 4792 4793 void CLOSURE_NAME(vec3 N 4794 #ifdef CLOSURE_DIFFUSE 4795 , 4796 vec3 albedo 4797 #endif 4798 #ifdef CLOSURE_GLOSSY 4799 , 4800 vec3 f0, 4801 int ssr_id 4802 #endif 4803 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4804 , 4805 float roughness 4806 #endif 4807 #ifdef CLOSURE_CLEARCOAT 4808 , 4809 vec3 C_N, 4810 float C_intensity, 4811 float C_roughness 4812 #endif 4813 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 4814 , 4815 float ao 4816 #endif 4817 #ifdef CLOSURE_SUBSURFACE 4818 , 4819 float sss_scale 4820 #endif 4821 #ifdef CLOSURE_REFRACTION 4822 , 4823 float ior 4824 #endif 4825 #ifdef CLOSURE_DIFFUSE 4826 , 4827 out vec3 out_diff 4828 #endif 4829 #ifdef CLOSURE_SUBSURFACE 4830 , 4831 out vec3 out_trans 4832 #endif 4833 #ifdef CLOSURE_GLOSSY 4834 , 4835 out vec3 out_spec 4836 #endif 4837 #ifdef CLOSURE_REFRACTION 4838 , 4839 out vec3 out_refr 4840 #endif 4841 #ifdef CLOSURE_GLOSSY 4842 , 4843 out vec3 ssr_spec 4844 #endif 4845 ) 4846 { 4847 #ifdef CLOSURE_DIFFUSE 4848 out_diff = vec3(0.0); 4849 #endif 4850 4851 #ifdef CLOSURE_SUBSURFACE 4852 out_trans = vec3(0.0); 4853 #endif 4854 4855 #ifdef CLOSURE_GLOSSY 4856 out_spec = vec3(0.0); 4857 #endif 4858 4859 #ifdef CLOSURE_REFRACTION 4860 out_refr = vec3(0.0); 4861 #endif 4862 4863 #ifdef SHADOW_SHADER 4864 return; 4865 #endif 4866 4867 /* Zero length vectors cause issues, see: T51979. */ 4868 float len = length(N); 4869 if (isnan(len)) { 4870 return; 4871 } 4872 N /= len; 4873 4874 #ifdef CLOSURE_CLEARCOAT 4875 len = length(C_N); 4876 if (isnan(len)) { 4877 return; 4878 } 4879 C_N /= len; 4880 #endif 4881 4882 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4883 roughness = clamp(roughness, 1e-8, 0.9999); 4884 float roughnessSquared = roughness * roughness; 4885 #endif 4886 4887 #ifdef CLOSURE_CLEARCOAT 4888 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 4889 float C_roughnessSquared = C_roughness * C_roughness; 4890 #endif 4891 4892 vec3 V = cameraVec; 4893 4894 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 4895 4896 /* ---------------------------------------------------------------- */ 4897 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 4898 /* ---------------------------------------------------------------- */ 4899 4900 #ifdef CLOSURE_GLOSSY 4901 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 4902 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 4903 #endif 4904 4905 #ifdef CLOSURE_CLEARCOAT 4906 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 4907 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 4908 vec3 out_spec_clear = vec3(0.0); 4909 #endif 4910 4911 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 4912 LightData ld = lights_data[i]; 4913 4914 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 4915 l_vector.xyz = ld.l_position - worldPosition; 4916 l_vector.w = length(l_vector.xyz); 4917 4918 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 4919 4920 if (l_vis < 1e-8) { 4921 continue; 4922 } 4923 4924 vec3 l_color_vis = ld.l_color * l_vis; 4925 4926 #ifdef CLOSURE_DIFFUSE 4927 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 4928 #endif 4929 4930 #ifdef CLOSURE_SUBSURFACE 4931 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 4932 #endif 4933 4934 #ifdef CLOSURE_GLOSSY 4935 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 4936 #endif 4937 4938 #ifdef CLOSURE_CLEARCOAT 4939 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 4940 ld.l_spec; 4941 #endif 4942 } 4943 4944 #ifdef CLOSURE_GLOSSY 4945 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 4946 out_spec *= F_area(f0, brdf_lut_lights.xy); 4947 #endif 4948 4949 #ifdef CLOSURE_CLEARCOAT 4950 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 4951 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 4952 out_spec += out_spec_clear * C_intensity; 4953 #endif 4954 4955 /* ---------------------------------------------------------------- */ 4956 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 4957 /* ---------------------------------------------------------------- */ 4958 4959 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 4960 #ifdef CLOSURE_GLOSSY 4961 vec4 spec_accum = vec4(0.0); 4962 #endif 4963 4964 #ifdef CLOSURE_CLEARCOAT 4965 vec4 C_spec_accum = vec4(0.0); 4966 #endif 4967 4968 #ifdef CLOSURE_REFRACTION 4969 vec4 refr_accum = vec4(0.0); 4970 #endif 4971 4972 #ifdef CLOSURE_GLOSSY 4973 /* ---------------------------- */ 4974 /* Planar Reflections */ 4975 /* ---------------------------- */ 4976 4977 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 4978 PlanarData pd = planars_data[i]; 4979 4980 /* Fade on geometric normal. */ 4981 float fade = probe_attenuation_planar( 4982 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 4983 4984 if (fade > 0.0) { 4985 if (!(ssrToggle && ssr_id == outputSsrId)) { 4986 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 4987 accumulate_light(spec, fade, spec_accum); 4988 } 4989 4990 #ifdef CLOSURE_CLEARCOAT 4991 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 4992 accumulate_light(C_spec, fade, C_spec_accum); 4993 #endif 4994 } 4995 } 4996 #endif 4997 4998 #ifdef CLOSURE_GLOSSY 4999 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 5000 #endif 5001 5002 #ifdef CLOSURE_CLEARCOAT 5003 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 5004 #endif 5005 5006 #ifdef CLOSURE_REFRACTION 5007 /* Refract the view vector using the depth heuristic. 5008 * Then later Refract a second time the already refracted 5009 * ray using the inverse ior. */ 5010 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 5011 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 5012 vec3 refr_pos = (refractionDepth > 0.0) ? 5013 line_plane_intersect( 5014 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 5015 worldPosition; 5016 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 5017 #endif 5018 5019 #ifdef CLOSURE_REFRACTION 5020 /* ---------------------------- */ 5021 /* Screen Space Refraction */ 5022 /* ---------------------------- */ 5023 #ifdef USE_REFRACTION 5024 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 5025 /* Find approximated position of the 2nd refraction event. */ 5026 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 5027 viewPosition; 5028 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 5029 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 5030 accumulate_light(trans.rgb, trans.a, refr_accum); 5031 } 5032 #endif 5033 5034 #endif 5035 5036 /* ---------------------------- */ 5037 /* Specular probes */ 5038 /* ---------------------------- */ 5039 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5040 5041 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 5042 # define GLASS_ACCUM 1 5043 # define ACCUM min(refr_accum.a, spec_accum.a) 5044 #elif defined(CLOSURE_REFRACTION) 5045 # define GLASS_ACCUM 0 5046 # define ACCUM refr_accum.a 5047 #else 5048 # define GLASS_ACCUM 0 5049 # define ACCUM spec_accum.a 5050 #endif 5051 5052 /* Starts at 1 because 0 is world probe */ 5053 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 5054 float fade = probe_attenuation_cube(i, worldPosition); 5055 5056 if (fade > 0.0) { 5057 5058 #if GLASS_ACCUM 5059 if (spec_accum.a < 0.999) { 5060 #endif 5061 #ifdef CLOSURE_GLOSSY 5062 if (!(ssrToggle && ssr_id == outputSsrId)) { 5063 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 5064 accumulate_light(spec, fade, spec_accum); 5065 } 5066 #endif 5067 5068 #ifdef CLOSURE_CLEARCOAT 5069 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 5070 accumulate_light(C_spec, fade, C_spec_accum); 5071 #endif 5072 #if GLASS_ACCUM 5073 } 5074 #endif 5075 5076 #if GLASS_ACCUM 5077 if (refr_accum.a < 0.999) { 5078 #endif 5079 #ifdef CLOSURE_REFRACTION 5080 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 5081 accumulate_light(trans, fade, refr_accum); 5082 #endif 5083 #if GLASS_ACCUM 5084 } 5085 #endif 5086 } 5087 } 5088 5089 #undef GLASS_ACCUM 5090 #undef ACCUM 5091 5092 /* ---------------------------- */ 5093 /* World Probe */ 5094 /* ---------------------------- */ 5095 #ifdef CLOSURE_GLOSSY 5096 if (spec_accum.a < 0.999) { 5097 if (!(ssrToggle && ssr_id == outputSsrId)) { 5098 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 5099 accumulate_light(spec, 1.0, spec_accum); 5100 } 5101 5102 # ifdef CLOSURE_CLEARCOAT 5103 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 5104 accumulate_light(C_spec, 1.0, C_spec_accum); 5105 # endif 5106 } 5107 #endif 5108 5109 #ifdef CLOSURE_REFRACTION 5110 if (refr_accum.a < 0.999) { 5111 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 5112 accumulate_light(trans, 1.0, refr_accum); 5113 } 5114 #endif 5115 #endif /* Specular probes */ 5116 5117 /* ---------------------------- */ 5118 /* Ambient Occlusion */ 5119 /* ---------------------------- */ 5120 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 5121 vec3 bent_normal; 5122 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 5123 #endif 5124 5125 /* ---------------------------- */ 5126 /* Specular Output */ 5127 /* ---------------------------- */ 5128 float NV = dot(N, V); 5129 #ifdef CLOSURE_GLOSSY 5130 vec2 uv = lut_coords(NV, roughness); 5131 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 5132 5133 /* This factor is outputted to be used by SSR in order 5134 * to match the intensity of the regular reflections. */ 5135 ssr_spec = F_ibl(f0, brdf_lut); 5136 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 5137 5138 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 5139 if (ssrToggle && ssr_id == outputSsrId) { 5140 spec_occlu = 1.0; 5141 } 5142 5143 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 5144 #endif 5145 5146 #ifdef CLOSURE_REFRACTION 5147 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 5148 5149 out_refr += refr_accum.rgb * btdf; 5150 #endif 5151 5152 #ifdef CLOSURE_CLEARCOAT 5153 NV = dot(C_N, V); 5154 vec2 C_uv = lut_coords(NV, C_roughness); 5155 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 5156 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 5157 5158 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 5159 #endif 5160 5161 #ifdef CLOSURE_GLOSSY 5162 /* Global toggle for lightprobe baking. */ 5163 out_spec *= float(specToggle); 5164 #endif 5165 5166 /* ---------------------------------------------------------------- */ 5167 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 5168 /* ---------------------------------------------------------------- */ 5169 5170 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 5171 #ifdef CLOSURE_DIFFUSE 5172 vec4 diff_accum = vec4(0.0); 5173 5174 /* ---------------------------- */ 5175 /* Irradiance Grids */ 5176 /* ---------------------------- */ 5177 /* Start at 1 because 0 is world irradiance */ 5178 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 5179 GridData gd = grids_data[i]; 5180 5181 vec3 localpos; 5182 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 5183 5184 if (fade > 0.0) { 5185 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 5186 accumulate_light(diff, fade, diff_accum); 5187 } 5188 } 5189 5190 /* ---------------------------- */ 5191 /* World Diffuse */ 5192 /* ---------------------------- */ 5193 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 5194 vec3 diff = probe_evaluate_world_diff(bent_normal); 5195 accumulate_light(diff, 1.0, diff_accum); 5196 } 5197 5198 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 5199 #endif 5200 } 5201 5202 /* Cleanup for next configuration */ 5203 #undef CLOSURE_NAME 5204 5205 #ifdef CLOSURE_DIFFUSE 5206 #undef CLOSURE_DIFFUSE 5207 #endif 5208 5209 #ifdef CLOSURE_GLOSSY 5210 #undef CLOSURE_GLOSSY 5211 #endif 5212 5213 #ifdef CLOSURE_CLEARCOAT 5214 #undef CLOSURE_CLEARCOAT 5215 #endif 5216 5217 #ifdef CLOSURE_REFRACTION 5218 #undef CLOSURE_REFRACTION 5219 #endif 5220 5221 #ifdef CLOSURE_SUBSURFACE 5222 #undef CLOSURE_SUBSURFACE 5223 #endif 5224 5225 #ifndef LIT_SURFACE_UNIFORM 5226 #define LIT_SURFACE_UNIFORM 5227 5228 uniform float refractionDepth; 5229 5230 #ifndef UTIL_TEX 5231 # define UTIL_TEX 5232 uniform sampler2DArray utilTex; 5233 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 5234 #endif /* UTIL_TEX */ 5235 5236 in vec3 worldPosition; 5237 in vec3 viewPosition; 5238 5239 #ifdef USE_FLAT_NORMAL 5240 flat in vec3 worldNormal; 5241 flat in vec3 viewNormal; 5242 #else 5243 in vec3 worldNormal; 5244 in vec3 viewNormal; 5245 #endif 5246 5247 #ifdef HAIR_SHADER 5248 in vec3 hairTangent; /* world space */ 5249 in float hairThickTime; 5250 in float hairThickness; 5251 in float hairTime; 5252 flat in int hairStrandID; 5253 5254 uniform int hairThicknessRes = 1; 5255 #endif 5256 5257 #endif /* LIT_SURFACE_UNIFORM */ 5258 5259 /** AUTO CONFIG 5260 * We include the file multiple times each time with a different configuration. 5261 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 5262 */ 5263 #if !defined(SURFACE_DEFAULT) 5264 #define SURFACE_DEFAULT 5265 #define CLOSURE_NAME eevee_closure_default 5266 #define CLOSURE_DIFFUSE 5267 #define CLOSURE_GLOSSY 5268 #endif /* SURFACE_DEFAULT */ 5269 5270 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 5271 #define SURFACE_PRINCIPLED 5272 #define CLOSURE_NAME eevee_closure_principled 5273 #define CLOSURE_DIFFUSE 5274 #define CLOSURE_GLOSSY 5275 #define CLOSURE_CLEARCOAT 5276 #define CLOSURE_REFRACTION 5277 #define CLOSURE_SUBSURFACE 5278 #endif /* SURFACE_PRINCIPLED */ 5279 5280 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 5281 #define SURFACE_CLEARCOAT 5282 #define CLOSURE_NAME eevee_closure_clearcoat 5283 #define CLOSURE_GLOSSY 5284 #define CLOSURE_CLEARCOAT 5285 #endif /* SURFACE_CLEARCOAT */ 5286 5287 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 5288 #define SURFACE_DIFFUSE 5289 #define CLOSURE_NAME eevee_closure_diffuse 5290 #define CLOSURE_DIFFUSE 5291 #endif /* SURFACE_DIFFUSE */ 5292 5293 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 5294 #define SURFACE_SUBSURFACE 5295 #define CLOSURE_NAME eevee_closure_subsurface 5296 #define CLOSURE_DIFFUSE 5297 #define CLOSURE_SUBSURFACE 5298 #endif /* SURFACE_SUBSURFACE */ 5299 5300 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 5301 #define SURFACE_SKIN 5302 #define CLOSURE_NAME eevee_closure_skin 5303 #define CLOSURE_DIFFUSE 5304 #define CLOSURE_SUBSURFACE 5305 #define CLOSURE_GLOSSY 5306 #endif /* SURFACE_SKIN */ 5307 5308 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 5309 #define SURFACE_GLOSSY 5310 #define CLOSURE_NAME eevee_closure_glossy 5311 #define CLOSURE_GLOSSY 5312 #endif /* SURFACE_GLOSSY */ 5313 5314 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 5315 #define SURFACE_REFRACT 5316 #define CLOSURE_NAME eevee_closure_refraction 5317 #define CLOSURE_REFRACTION 5318 #endif /* SURFACE_REFRACT */ 5319 5320 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 5321 #define SURFACE_GLASS 5322 #define CLOSURE_NAME eevee_closure_glass 5323 #define CLOSURE_GLOSSY 5324 #define CLOSURE_REFRACTION 5325 #endif /* SURFACE_GLASS */ 5326 5327 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 5328 #ifdef CLOSURE_CLEARCOAT 5329 #ifndef CLOSURE_GLOSSY 5330 # define CLOSURE_GLOSSY 5331 #endif 5332 #endif /* CLOSURE_CLEARCOAT */ 5333 5334 void CLOSURE_NAME(vec3 N 5335 #ifdef CLOSURE_DIFFUSE 5336 , 5337 vec3 albedo 5338 #endif 5339 #ifdef CLOSURE_GLOSSY 5340 , 5341 vec3 f0, 5342 int ssr_id 5343 #endif 5344 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5345 , 5346 float roughness 5347 #endif 5348 #ifdef CLOSURE_CLEARCOAT 5349 , 5350 vec3 C_N, 5351 float C_intensity, 5352 float C_roughness 5353 #endif 5354 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 5355 , 5356 float ao 5357 #endif 5358 #ifdef CLOSURE_SUBSURFACE 5359 , 5360 float sss_scale 5361 #endif 5362 #ifdef CLOSURE_REFRACTION 5363 , 5364 float ior 5365 #endif 5366 #ifdef CLOSURE_DIFFUSE 5367 , 5368 out vec3 out_diff 5369 #endif 5370 #ifdef CLOSURE_SUBSURFACE 5371 , 5372 out vec3 out_trans 5373 #endif 5374 #ifdef CLOSURE_GLOSSY 5375 , 5376 out vec3 out_spec 5377 #endif 5378 #ifdef CLOSURE_REFRACTION 5379 , 5380 out vec3 out_refr 5381 #endif 5382 #ifdef CLOSURE_GLOSSY 5383 , 5384 out vec3 ssr_spec 5385 #endif 5386 ) 5387 { 5388 #ifdef CLOSURE_DIFFUSE 5389 out_diff = vec3(0.0); 5390 #endif 5391 5392 #ifdef CLOSURE_SUBSURFACE 5393 out_trans = vec3(0.0); 5394 #endif 5395 5396 #ifdef CLOSURE_GLOSSY 5397 out_spec = vec3(0.0); 5398 #endif 5399 5400 #ifdef CLOSURE_REFRACTION 5401 out_refr = vec3(0.0); 5402 #endif 5403 5404 #ifdef SHADOW_SHADER 5405 return; 5406 #endif 5407 5408 /* Zero length vectors cause issues, see: T51979. */ 5409 float len = length(N); 5410 if (isnan(len)) { 5411 return; 5412 } 5413 N /= len; 5414 5415 #ifdef CLOSURE_CLEARCOAT 5416 len = length(C_N); 5417 if (isnan(len)) { 5418 return; 5419 } 5420 C_N /= len; 5421 #endif 5422 5423 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5424 roughness = clamp(roughness, 1e-8, 0.9999); 5425 float roughnessSquared = roughness * roughness; 5426 #endif 5427 5428 #ifdef CLOSURE_CLEARCOAT 5429 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 5430 float C_roughnessSquared = C_roughness * C_roughness; 5431 #endif 5432 5433 vec3 V = cameraVec; 5434 5435 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 5436 5437 /* ---------------------------------------------------------------- */ 5438 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 5439 /* ---------------------------------------------------------------- */ 5440 5441 #ifdef CLOSURE_GLOSSY 5442 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 5443 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 5444 #endif 5445 5446 #ifdef CLOSURE_CLEARCOAT 5447 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 5448 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 5449 vec3 out_spec_clear = vec3(0.0); 5450 #endif 5451 5452 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 5453 LightData ld = lights_data[i]; 5454 5455 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 5456 l_vector.xyz = ld.l_position - worldPosition; 5457 l_vector.w = length(l_vector.xyz); 5458 5459 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 5460 5461 if (l_vis < 1e-8) { 5462 continue; 5463 } 5464 5465 vec3 l_color_vis = ld.l_color * l_vis; 5466 5467 #ifdef CLOSURE_DIFFUSE 5468 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 5469 #endif 5470 5471 #ifdef CLOSURE_SUBSURFACE 5472 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 5473 #endif 5474 5475 #ifdef CLOSURE_GLOSSY 5476 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 5477 #endif 5478 5479 #ifdef CLOSURE_CLEARCOAT 5480 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 5481 ld.l_spec; 5482 #endif 5483 } 5484 5485 #ifdef CLOSURE_GLOSSY 5486 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 5487 out_spec *= F_area(f0, brdf_lut_lights.xy); 5488 #endif 5489 5490 #ifdef CLOSURE_CLEARCOAT 5491 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 5492 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 5493 out_spec += out_spec_clear * C_intensity; 5494 #endif 5495 5496 /* ---------------------------------------------------------------- */ 5497 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 5498 /* ---------------------------------------------------------------- */ 5499 5500 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 5501 #ifdef CLOSURE_GLOSSY 5502 vec4 spec_accum = vec4(0.0); 5503 #endif 5504 5505 #ifdef CLOSURE_CLEARCOAT 5506 vec4 C_spec_accum = vec4(0.0); 5507 #endif 5508 5509 #ifdef CLOSURE_REFRACTION 5510 vec4 refr_accum = vec4(0.0); 5511 #endif 5512 5513 #ifdef CLOSURE_GLOSSY 5514 /* ---------------------------- */ 5515 /* Planar Reflections */ 5516 /* ---------------------------- */ 5517 5518 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 5519 PlanarData pd = planars_data[i]; 5520 5521 /* Fade on geometric normal. */ 5522 float fade = probe_attenuation_planar( 5523 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 5524 5525 if (fade > 0.0) { 5526 if (!(ssrToggle && ssr_id == outputSsrId)) { 5527 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 5528 accumulate_light(spec, fade, spec_accum); 5529 } 5530 5531 #ifdef CLOSURE_CLEARCOAT 5532 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 5533 accumulate_light(C_spec, fade, C_spec_accum); 5534 #endif 5535 } 5536 } 5537 #endif 5538 5539 #ifdef CLOSURE_GLOSSY 5540 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 5541 #endif 5542 5543 #ifdef CLOSURE_CLEARCOAT 5544 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 5545 #endif 5546 5547 #ifdef CLOSURE_REFRACTION 5548 /* Refract the view vector using the depth heuristic. 5549 * Then later Refract a second time the already refracted 5550 * ray using the inverse ior. */ 5551 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 5552 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 5553 vec3 refr_pos = (refractionDepth > 0.0) ? 5554 line_plane_intersect( 5555 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 5556 worldPosition; 5557 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 5558 #endif 5559 5560 #ifdef CLOSURE_REFRACTION 5561 /* ---------------------------- */ 5562 /* Screen Space Refraction */ 5563 /* ---------------------------- */ 5564 #ifdef USE_REFRACTION 5565 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 5566 /* Find approximated position of the 2nd refraction event. */ 5567 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 5568 viewPosition; 5569 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 5570 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 5571 accumulate_light(trans.rgb, trans.a, refr_accum); 5572 } 5573 #endif 5574 5575 #endif 5576 5577 /* ---------------------------- */ 5578 /* Specular probes */ 5579 /* ---------------------------- */ 5580 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5581 5582 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 5583 # define GLASS_ACCUM 1 5584 # define ACCUM min(refr_accum.a, spec_accum.a) 5585 #elif defined(CLOSURE_REFRACTION) 5586 # define GLASS_ACCUM 0 5587 # define ACCUM refr_accum.a 5588 #else 5589 # define GLASS_ACCUM 0 5590 # define ACCUM spec_accum.a 5591 #endif 5592 5593 /* Starts at 1 because 0 is world probe */ 5594 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 5595 float fade = probe_attenuation_cube(i, worldPosition); 5596 5597 if (fade > 0.0) { 5598 5599 #if GLASS_ACCUM 5600 if (spec_accum.a < 0.999) { 5601 #endif 5602 #ifdef CLOSURE_GLOSSY 5603 if (!(ssrToggle && ssr_id == outputSsrId)) { 5604 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 5605 accumulate_light(spec, fade, spec_accum); 5606 } 5607 #endif 5608 5609 #ifdef CLOSURE_CLEARCOAT 5610 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 5611 accumulate_light(C_spec, fade, C_spec_accum); 5612 #endif 5613 #if GLASS_ACCUM 5614 } 5615 #endif 5616 5617 #if GLASS_ACCUM 5618 if (refr_accum.a < 0.999) { 5619 #endif 5620 #ifdef CLOSURE_REFRACTION 5621 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 5622 accumulate_light(trans, fade, refr_accum); 5623 #endif 5624 #if GLASS_ACCUM 5625 } 5626 #endif 5627 } 5628 } 5629 5630 #undef GLASS_ACCUM 5631 #undef ACCUM 5632 5633 /* ---------------------------- */ 5634 /* World Probe */ 5635 /* ---------------------------- */ 5636 #ifdef CLOSURE_GLOSSY 5637 if (spec_accum.a < 0.999) { 5638 if (!(ssrToggle && ssr_id == outputSsrId)) { 5639 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 5640 accumulate_light(spec, 1.0, spec_accum); 5641 } 5642 5643 # ifdef CLOSURE_CLEARCOAT 5644 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 5645 accumulate_light(C_spec, 1.0, C_spec_accum); 5646 # endif 5647 } 5648 #endif 5649 5650 #ifdef CLOSURE_REFRACTION 5651 if (refr_accum.a < 0.999) { 5652 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 5653 accumulate_light(trans, 1.0, refr_accum); 5654 } 5655 #endif 5656 #endif /* Specular probes */ 5657 5658 /* ---------------------------- */ 5659 /* Ambient Occlusion */ 5660 /* ---------------------------- */ 5661 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 5662 vec3 bent_normal; 5663 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 5664 #endif 5665 5666 /* ---------------------------- */ 5667 /* Specular Output */ 5668 /* ---------------------------- */ 5669 float NV = dot(N, V); 5670 #ifdef CLOSURE_GLOSSY 5671 vec2 uv = lut_coords(NV, roughness); 5672 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 5673 5674 /* This factor is outputted to be used by SSR in order 5675 * to match the intensity of the regular reflections. */ 5676 ssr_spec = F_ibl(f0, brdf_lut); 5677 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 5678 5679 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 5680 if (ssrToggle && ssr_id == outputSsrId) { 5681 spec_occlu = 1.0; 5682 } 5683 5684 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 5685 #endif 5686 5687 #ifdef CLOSURE_REFRACTION 5688 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 5689 5690 out_refr += refr_accum.rgb * btdf; 5691 #endif 5692 5693 #ifdef CLOSURE_CLEARCOAT 5694 NV = dot(C_N, V); 5695 vec2 C_uv = lut_coords(NV, C_roughness); 5696 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 5697 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 5698 5699 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 5700 #endif 5701 5702 #ifdef CLOSURE_GLOSSY 5703 /* Global toggle for lightprobe baking. */ 5704 out_spec *= float(specToggle); 5705 #endif 5706 5707 /* ---------------------------------------------------------------- */ 5708 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 5709 /* ---------------------------------------------------------------- */ 5710 5711 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 5712 #ifdef CLOSURE_DIFFUSE 5713 vec4 diff_accum = vec4(0.0); 5714 5715 /* ---------------------------- */ 5716 /* Irradiance Grids */ 5717 /* ---------------------------- */ 5718 /* Start at 1 because 0 is world irradiance */ 5719 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 5720 GridData gd = grids_data[i]; 5721 5722 vec3 localpos; 5723 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 5724 5725 if (fade > 0.0) { 5726 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 5727 accumulate_light(diff, fade, diff_accum); 5728 } 5729 } 5730 5731 /* ---------------------------- */ 5732 /* World Diffuse */ 5733 /* ---------------------------- */ 5734 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 5735 vec3 diff = probe_evaluate_world_diff(bent_normal); 5736 accumulate_light(diff, 1.0, diff_accum); 5737 } 5738 5739 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 5740 #endif 5741 } 5742 5743 /* Cleanup for next configuration */ 5744 #undef CLOSURE_NAME 5745 5746 #ifdef CLOSURE_DIFFUSE 5747 #undef CLOSURE_DIFFUSE 5748 #endif 5749 5750 #ifdef CLOSURE_GLOSSY 5751 #undef CLOSURE_GLOSSY 5752 #endif 5753 5754 #ifdef CLOSURE_CLEARCOAT 5755 #undef CLOSURE_CLEARCOAT 5756 #endif 5757 5758 #ifdef CLOSURE_REFRACTION 5759 #undef CLOSURE_REFRACTION 5760 #endif 5761 5762 #ifdef CLOSURE_SUBSURFACE 5763 #undef CLOSURE_SUBSURFACE 5764 #endif 5765 5766 #ifndef LIT_SURFACE_UNIFORM 5767 #define LIT_SURFACE_UNIFORM 5768 5769 uniform float refractionDepth; 5770 5771 #ifndef UTIL_TEX 5772 # define UTIL_TEX 5773 uniform sampler2DArray utilTex; 5774 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 5775 #endif /* UTIL_TEX */ 5776 5777 in vec3 worldPosition; 5778 in vec3 viewPosition; 5779 5780 #ifdef USE_FLAT_NORMAL 5781 flat in vec3 worldNormal; 5782 flat in vec3 viewNormal; 5783 #else 5784 in vec3 worldNormal; 5785 in vec3 viewNormal; 5786 #endif 5787 5788 #ifdef HAIR_SHADER 5789 in vec3 hairTangent; /* world space */ 5790 in float hairThickTime; 5791 in float hairThickness; 5792 in float hairTime; 5793 flat in int hairStrandID; 5794 5795 uniform int hairThicknessRes = 1; 5796 #endif 5797 5798 #endif /* LIT_SURFACE_UNIFORM */ 5799 5800 /** AUTO CONFIG 5801 * We include the file multiple times each time with a different configuration. 5802 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 5803 */ 5804 #if !defined(SURFACE_DEFAULT) 5805 #define SURFACE_DEFAULT 5806 #define CLOSURE_NAME eevee_closure_default 5807 #define CLOSURE_DIFFUSE 5808 #define CLOSURE_GLOSSY 5809 #endif /* SURFACE_DEFAULT */ 5810 5811 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 5812 #define SURFACE_PRINCIPLED 5813 #define CLOSURE_NAME eevee_closure_principled 5814 #define CLOSURE_DIFFUSE 5815 #define CLOSURE_GLOSSY 5816 #define CLOSURE_CLEARCOAT 5817 #define CLOSURE_REFRACTION 5818 #define CLOSURE_SUBSURFACE 5819 #endif /* SURFACE_PRINCIPLED */ 5820 5821 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 5822 #define SURFACE_CLEARCOAT 5823 #define CLOSURE_NAME eevee_closure_clearcoat 5824 #define CLOSURE_GLOSSY 5825 #define CLOSURE_CLEARCOAT 5826 #endif /* SURFACE_CLEARCOAT */ 5827 5828 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 5829 #define SURFACE_DIFFUSE 5830 #define CLOSURE_NAME eevee_closure_diffuse 5831 #define CLOSURE_DIFFUSE 5832 #endif /* SURFACE_DIFFUSE */ 5833 5834 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 5835 #define SURFACE_SUBSURFACE 5836 #define CLOSURE_NAME eevee_closure_subsurface 5837 #define CLOSURE_DIFFUSE 5838 #define CLOSURE_SUBSURFACE 5839 #endif /* SURFACE_SUBSURFACE */ 5840 5841 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 5842 #define SURFACE_SKIN 5843 #define CLOSURE_NAME eevee_closure_skin 5844 #define CLOSURE_DIFFUSE 5845 #define CLOSURE_SUBSURFACE 5846 #define CLOSURE_GLOSSY 5847 #endif /* SURFACE_SKIN */ 5848 5849 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 5850 #define SURFACE_GLOSSY 5851 #define CLOSURE_NAME eevee_closure_glossy 5852 #define CLOSURE_GLOSSY 5853 #endif /* SURFACE_GLOSSY */ 5854 5855 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 5856 #define SURFACE_REFRACT 5857 #define CLOSURE_NAME eevee_closure_refraction 5858 #define CLOSURE_REFRACTION 5859 #endif /* SURFACE_REFRACT */ 5860 5861 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 5862 #define SURFACE_GLASS 5863 #define CLOSURE_NAME eevee_closure_glass 5864 #define CLOSURE_GLOSSY 5865 #define CLOSURE_REFRACTION 5866 #endif /* SURFACE_GLASS */ 5867 5868 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 5869 #ifdef CLOSURE_CLEARCOAT 5870 #ifndef CLOSURE_GLOSSY 5871 # define CLOSURE_GLOSSY 5872 #endif 5873 #endif /* CLOSURE_CLEARCOAT */ 5874 5875 void CLOSURE_NAME(vec3 N 5876 #ifdef CLOSURE_DIFFUSE 5877 , 5878 vec3 albedo 5879 #endif 5880 #ifdef CLOSURE_GLOSSY 5881 , 5882 vec3 f0, 5883 int ssr_id 5884 #endif 5885 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5886 , 5887 float roughness 5888 #endif 5889 #ifdef CLOSURE_CLEARCOAT 5890 , 5891 vec3 C_N, 5892 float C_intensity, 5893 float C_roughness 5894 #endif 5895 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 5896 , 5897 float ao 5898 #endif 5899 #ifdef CLOSURE_SUBSURFACE 5900 , 5901 float sss_scale 5902 #endif 5903 #ifdef CLOSURE_REFRACTION 5904 , 5905 float ior 5906 #endif 5907 #ifdef CLOSURE_DIFFUSE 5908 , 5909 out vec3 out_diff 5910 #endif 5911 #ifdef CLOSURE_SUBSURFACE 5912 , 5913 out vec3 out_trans 5914 #endif 5915 #ifdef CLOSURE_GLOSSY 5916 , 5917 out vec3 out_spec 5918 #endif 5919 #ifdef CLOSURE_REFRACTION 5920 , 5921 out vec3 out_refr 5922 #endif 5923 #ifdef CLOSURE_GLOSSY 5924 , 5925 out vec3 ssr_spec 5926 #endif 5927 ) 5928 { 5929 #ifdef CLOSURE_DIFFUSE 5930 out_diff = vec3(0.0); 5931 #endif 5932 5933 #ifdef CLOSURE_SUBSURFACE 5934 out_trans = vec3(0.0); 5935 #endif 5936 5937 #ifdef CLOSURE_GLOSSY 5938 out_spec = vec3(0.0); 5939 #endif 5940 5941 #ifdef CLOSURE_REFRACTION 5942 out_refr = vec3(0.0); 5943 #endif 5944 5945 #ifdef SHADOW_SHADER 5946 return; 5947 #endif 5948 5949 /* Zero length vectors cause issues, see: T51979. */ 5950 float len = length(N); 5951 if (isnan(len)) { 5952 return; 5953 } 5954 N /= len; 5955 5956 #ifdef CLOSURE_CLEARCOAT 5957 len = length(C_N); 5958 if (isnan(len)) { 5959 return; 5960 } 5961 C_N /= len; 5962 #endif 5963 5964 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5965 roughness = clamp(roughness, 1e-8, 0.9999); 5966 float roughnessSquared = roughness * roughness; 5967 #endif 5968 5969 #ifdef CLOSURE_CLEARCOAT 5970 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 5971 float C_roughnessSquared = C_roughness * C_roughness; 5972 #endif 5973 5974 vec3 V = cameraVec; 5975 5976 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 5977 5978 /* ---------------------------------------------------------------- */ 5979 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 5980 /* ---------------------------------------------------------------- */ 5981 5982 #ifdef CLOSURE_GLOSSY 5983 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 5984 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 5985 #endif 5986 5987 #ifdef CLOSURE_CLEARCOAT 5988 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 5989 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 5990 vec3 out_spec_clear = vec3(0.0); 5991 #endif 5992 5993 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 5994 LightData ld = lights_data[i]; 5995 5996 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 5997 l_vector.xyz = ld.l_position - worldPosition; 5998 l_vector.w = length(l_vector.xyz); 5999 6000 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 6001 6002 if (l_vis < 1e-8) { 6003 continue; 6004 } 6005 6006 vec3 l_color_vis = ld.l_color * l_vis; 6007 6008 #ifdef CLOSURE_DIFFUSE 6009 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 6010 #endif 6011 6012 #ifdef CLOSURE_SUBSURFACE 6013 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 6014 #endif 6015 6016 #ifdef CLOSURE_GLOSSY 6017 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 6018 #endif 6019 6020 #ifdef CLOSURE_CLEARCOAT 6021 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 6022 ld.l_spec; 6023 #endif 6024 } 6025 6026 #ifdef CLOSURE_GLOSSY 6027 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 6028 out_spec *= F_area(f0, brdf_lut_lights.xy); 6029 #endif 6030 6031 #ifdef CLOSURE_CLEARCOAT 6032 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 6033 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 6034 out_spec += out_spec_clear * C_intensity; 6035 #endif 6036 6037 /* ---------------------------------------------------------------- */ 6038 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 6039 /* ---------------------------------------------------------------- */ 6040 6041 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 6042 #ifdef CLOSURE_GLOSSY 6043 vec4 spec_accum = vec4(0.0); 6044 #endif 6045 6046 #ifdef CLOSURE_CLEARCOAT 6047 vec4 C_spec_accum = vec4(0.0); 6048 #endif 6049 6050 #ifdef CLOSURE_REFRACTION 6051 vec4 refr_accum = vec4(0.0); 6052 #endif 6053 6054 #ifdef CLOSURE_GLOSSY 6055 /* ---------------------------- */ 6056 /* Planar Reflections */ 6057 /* ---------------------------- */ 6058 6059 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 6060 PlanarData pd = planars_data[i]; 6061 6062 /* Fade on geometric normal. */ 6063 float fade = probe_attenuation_planar( 6064 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 6065 6066 if (fade > 0.0) { 6067 if (!(ssrToggle && ssr_id == outputSsrId)) { 6068 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 6069 accumulate_light(spec, fade, spec_accum); 6070 } 6071 6072 #ifdef CLOSURE_CLEARCOAT 6073 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 6074 accumulate_light(C_spec, fade, C_spec_accum); 6075 #endif 6076 } 6077 } 6078 #endif 6079 6080 #ifdef CLOSURE_GLOSSY 6081 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 6082 #endif 6083 6084 #ifdef CLOSURE_CLEARCOAT 6085 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 6086 #endif 6087 6088 #ifdef CLOSURE_REFRACTION 6089 /* Refract the view vector using the depth heuristic. 6090 * Then later Refract a second time the already refracted 6091 * ray using the inverse ior. */ 6092 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 6093 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 6094 vec3 refr_pos = (refractionDepth > 0.0) ? 6095 line_plane_intersect( 6096 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 6097 worldPosition; 6098 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 6099 #endif 6100 6101 #ifdef CLOSURE_REFRACTION 6102 /* ---------------------------- */ 6103 /* Screen Space Refraction */ 6104 /* ---------------------------- */ 6105 #ifdef USE_REFRACTION 6106 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 6107 /* Find approximated position of the 2nd refraction event. */ 6108 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 6109 viewPosition; 6110 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 6111 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 6112 accumulate_light(trans.rgb, trans.a, refr_accum); 6113 } 6114 #endif 6115 6116 #endif 6117 6118 /* ---------------------------- */ 6119 /* Specular probes */ 6120 /* ---------------------------- */ 6121 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6122 6123 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 6124 # define GLASS_ACCUM 1 6125 # define ACCUM min(refr_accum.a, spec_accum.a) 6126 #elif defined(CLOSURE_REFRACTION) 6127 # define GLASS_ACCUM 0 6128 # define ACCUM refr_accum.a 6129 #else 6130 # define GLASS_ACCUM 0 6131 # define ACCUM spec_accum.a 6132 #endif 6133 6134 /* Starts at 1 because 0 is world probe */ 6135 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 6136 float fade = probe_attenuation_cube(i, worldPosition); 6137 6138 if (fade > 0.0) { 6139 6140 #if GLASS_ACCUM 6141 if (spec_accum.a < 0.999) { 6142 #endif 6143 #ifdef CLOSURE_GLOSSY 6144 if (!(ssrToggle && ssr_id == outputSsrId)) { 6145 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 6146 accumulate_light(spec, fade, spec_accum); 6147 } 6148 #endif 6149 6150 #ifdef CLOSURE_CLEARCOAT 6151 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 6152 accumulate_light(C_spec, fade, C_spec_accum); 6153 #endif 6154 #if GLASS_ACCUM 6155 } 6156 #endif 6157 6158 #if GLASS_ACCUM 6159 if (refr_accum.a < 0.999) { 6160 #endif 6161 #ifdef CLOSURE_REFRACTION 6162 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 6163 accumulate_light(trans, fade, refr_accum); 6164 #endif 6165 #if GLASS_ACCUM 6166 } 6167 #endif 6168 } 6169 } 6170 6171 #undef GLASS_ACCUM 6172 #undef ACCUM 6173 6174 /* ---------------------------- */ 6175 /* World Probe */ 6176 /* ---------------------------- */ 6177 #ifdef CLOSURE_GLOSSY 6178 if (spec_accum.a < 0.999) { 6179 if (!(ssrToggle && ssr_id == outputSsrId)) { 6180 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 6181 accumulate_light(spec, 1.0, spec_accum); 6182 } 6183 6184 # ifdef CLOSURE_CLEARCOAT 6185 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 6186 accumulate_light(C_spec, 1.0, C_spec_accum); 6187 # endif 6188 } 6189 #endif 6190 6191 #ifdef CLOSURE_REFRACTION 6192 if (refr_accum.a < 0.999) { 6193 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 6194 accumulate_light(trans, 1.0, refr_accum); 6195 } 6196 #endif 6197 #endif /* Specular probes */ 6198 6199 /* ---------------------------- */ 6200 /* Ambient Occlusion */ 6201 /* ---------------------------- */ 6202 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 6203 vec3 bent_normal; 6204 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 6205 #endif 6206 6207 /* ---------------------------- */ 6208 /* Specular Output */ 6209 /* ---------------------------- */ 6210 float NV = dot(N, V); 6211 #ifdef CLOSURE_GLOSSY 6212 vec2 uv = lut_coords(NV, roughness); 6213 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 6214 6215 /* This factor is outputted to be used by SSR in order 6216 * to match the intensity of the regular reflections. */ 6217 ssr_spec = F_ibl(f0, brdf_lut); 6218 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 6219 6220 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 6221 if (ssrToggle && ssr_id == outputSsrId) { 6222 spec_occlu = 1.0; 6223 } 6224 6225 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 6226 #endif 6227 6228 #ifdef CLOSURE_REFRACTION 6229 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 6230 6231 out_refr += refr_accum.rgb * btdf; 6232 #endif 6233 6234 #ifdef CLOSURE_CLEARCOAT 6235 NV = dot(C_N, V); 6236 vec2 C_uv = lut_coords(NV, C_roughness); 6237 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 6238 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 6239 6240 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 6241 #endif 6242 6243 #ifdef CLOSURE_GLOSSY 6244 /* Global toggle for lightprobe baking. */ 6245 out_spec *= float(specToggle); 6246 #endif 6247 6248 /* ---------------------------------------------------------------- */ 6249 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 6250 /* ---------------------------------------------------------------- */ 6251 6252 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 6253 #ifdef CLOSURE_DIFFUSE 6254 vec4 diff_accum = vec4(0.0); 6255 6256 /* ---------------------------- */ 6257 /* Irradiance Grids */ 6258 /* ---------------------------- */ 6259 /* Start at 1 because 0 is world irradiance */ 6260 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 6261 GridData gd = grids_data[i]; 6262 6263 vec3 localpos; 6264 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 6265 6266 if (fade > 0.0) { 6267 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 6268 accumulate_light(diff, fade, diff_accum); 6269 } 6270 } 6271 6272 /* ---------------------------- */ 6273 /* World Diffuse */ 6274 /* ---------------------------- */ 6275 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 6276 vec3 diff = probe_evaluate_world_diff(bent_normal); 6277 accumulate_light(diff, 1.0, diff_accum); 6278 } 6279 6280 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 6281 #endif 6282 } 6283 6284 /* Cleanup for next configuration */ 6285 #undef CLOSURE_NAME 6286 6287 #ifdef CLOSURE_DIFFUSE 6288 #undef CLOSURE_DIFFUSE 6289 #endif 6290 6291 #ifdef CLOSURE_GLOSSY 6292 #undef CLOSURE_GLOSSY 6293 #endif 6294 6295 #ifdef CLOSURE_CLEARCOAT 6296 #undef CLOSURE_CLEARCOAT 6297 #endif 6298 6299 #ifdef CLOSURE_REFRACTION 6300 #undef CLOSURE_REFRACTION 6301 #endif 6302 6303 #ifdef CLOSURE_SUBSURFACE 6304 #undef CLOSURE_SUBSURFACE 6305 #endif 6306 6307 #ifndef LIT_SURFACE_UNIFORM 6308 #define LIT_SURFACE_UNIFORM 6309 6310 uniform float refractionDepth; 6311 6312 #ifndef UTIL_TEX 6313 # define UTIL_TEX 6314 uniform sampler2DArray utilTex; 6315 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 6316 #endif /* UTIL_TEX */ 6317 6318 in vec3 worldPosition; 6319 in vec3 viewPosition; 6320 6321 #ifdef USE_FLAT_NORMAL 6322 flat in vec3 worldNormal; 6323 flat in vec3 viewNormal; 6324 #else 6325 in vec3 worldNormal; 6326 in vec3 viewNormal; 6327 #endif 6328 6329 #ifdef HAIR_SHADER 6330 in vec3 hairTangent; /* world space */ 6331 in float hairThickTime; 6332 in float hairThickness; 6333 in float hairTime; 6334 flat in int hairStrandID; 6335 6336 uniform int hairThicknessRes = 1; 6337 #endif 6338 6339 #endif /* LIT_SURFACE_UNIFORM */ 6340 6341 /** AUTO CONFIG 6342 * We include the file multiple times each time with a different configuration. 6343 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 6344 */ 6345 #if !defined(SURFACE_DEFAULT) 6346 #define SURFACE_DEFAULT 6347 #define CLOSURE_NAME eevee_closure_default 6348 #define CLOSURE_DIFFUSE 6349 #define CLOSURE_GLOSSY 6350 #endif /* SURFACE_DEFAULT */ 6351 6352 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 6353 #define SURFACE_PRINCIPLED 6354 #define CLOSURE_NAME eevee_closure_principled 6355 #define CLOSURE_DIFFUSE 6356 #define CLOSURE_GLOSSY 6357 #define CLOSURE_CLEARCOAT 6358 #define CLOSURE_REFRACTION 6359 #define CLOSURE_SUBSURFACE 6360 #endif /* SURFACE_PRINCIPLED */ 6361 6362 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 6363 #define SURFACE_CLEARCOAT 6364 #define CLOSURE_NAME eevee_closure_clearcoat 6365 #define CLOSURE_GLOSSY 6366 #define CLOSURE_CLEARCOAT 6367 #endif /* SURFACE_CLEARCOAT */ 6368 6369 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 6370 #define SURFACE_DIFFUSE 6371 #define CLOSURE_NAME eevee_closure_diffuse 6372 #define CLOSURE_DIFFUSE 6373 #endif /* SURFACE_DIFFUSE */ 6374 6375 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 6376 #define SURFACE_SUBSURFACE 6377 #define CLOSURE_NAME eevee_closure_subsurface 6378 #define CLOSURE_DIFFUSE 6379 #define CLOSURE_SUBSURFACE 6380 #endif /* SURFACE_SUBSURFACE */ 6381 6382 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 6383 #define SURFACE_SKIN 6384 #define CLOSURE_NAME eevee_closure_skin 6385 #define CLOSURE_DIFFUSE 6386 #define CLOSURE_SUBSURFACE 6387 #define CLOSURE_GLOSSY 6388 #endif /* SURFACE_SKIN */ 6389 6390 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 6391 #define SURFACE_GLOSSY 6392 #define CLOSURE_NAME eevee_closure_glossy 6393 #define CLOSURE_GLOSSY 6394 #endif /* SURFACE_GLOSSY */ 6395 6396 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 6397 #define SURFACE_REFRACT 6398 #define CLOSURE_NAME eevee_closure_refraction 6399 #define CLOSURE_REFRACTION 6400 #endif /* SURFACE_REFRACT */ 6401 6402 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 6403 #define SURFACE_GLASS 6404 #define CLOSURE_NAME eevee_closure_glass 6405 #define CLOSURE_GLOSSY 6406 #define CLOSURE_REFRACTION 6407 #endif /* SURFACE_GLASS */ 6408 6409 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 6410 #ifdef CLOSURE_CLEARCOAT 6411 #ifndef CLOSURE_GLOSSY 6412 # define CLOSURE_GLOSSY 6413 #endif 6414 #endif /* CLOSURE_CLEARCOAT */ 6415 6416 void CLOSURE_NAME(vec3 N 6417 #ifdef CLOSURE_DIFFUSE 6418 , 6419 vec3 albedo 6420 #endif 6421 #ifdef CLOSURE_GLOSSY 6422 , 6423 vec3 f0, 6424 int ssr_id 6425 #endif 6426 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6427 , 6428 float roughness 6429 #endif 6430 #ifdef CLOSURE_CLEARCOAT 6431 , 6432 vec3 C_N, 6433 float C_intensity, 6434 float C_roughness 6435 #endif 6436 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 6437 , 6438 float ao 6439 #endif 6440 #ifdef CLOSURE_SUBSURFACE 6441 , 6442 float sss_scale 6443 #endif 6444 #ifdef CLOSURE_REFRACTION 6445 , 6446 float ior 6447 #endif 6448 #ifdef CLOSURE_DIFFUSE 6449 , 6450 out vec3 out_diff 6451 #endif 6452 #ifdef CLOSURE_SUBSURFACE 6453 , 6454 out vec3 out_trans 6455 #endif 6456 #ifdef CLOSURE_GLOSSY 6457 , 6458 out vec3 out_spec 6459 #endif 6460 #ifdef CLOSURE_REFRACTION 6461 , 6462 out vec3 out_refr 6463 #endif 6464 #ifdef CLOSURE_GLOSSY 6465 , 6466 out vec3 ssr_spec 6467 #endif 6468 ) 6469 { 6470 #ifdef CLOSURE_DIFFUSE 6471 out_diff = vec3(0.0); 6472 #endif 6473 6474 #ifdef CLOSURE_SUBSURFACE 6475 out_trans = vec3(0.0); 6476 #endif 6477 6478 #ifdef CLOSURE_GLOSSY 6479 out_spec = vec3(0.0); 6480 #endif 6481 6482 #ifdef CLOSURE_REFRACTION 6483 out_refr = vec3(0.0); 6484 #endif 6485 6486 #ifdef SHADOW_SHADER 6487 return; 6488 #endif 6489 6490 /* Zero length vectors cause issues, see: T51979. */ 6491 float len = length(N); 6492 if (isnan(len)) { 6493 return; 6494 } 6495 N /= len; 6496 6497 #ifdef CLOSURE_CLEARCOAT 6498 len = length(C_N); 6499 if (isnan(len)) { 6500 return; 6501 } 6502 C_N /= len; 6503 #endif 6504 6505 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6506 roughness = clamp(roughness, 1e-8, 0.9999); 6507 float roughnessSquared = roughness * roughness; 6508 #endif 6509 6510 #ifdef CLOSURE_CLEARCOAT 6511 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 6512 float C_roughnessSquared = C_roughness * C_roughness; 6513 #endif 6514 6515 vec3 V = cameraVec; 6516 6517 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 6518 6519 /* ---------------------------------------------------------------- */ 6520 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 6521 /* ---------------------------------------------------------------- */ 6522 6523 #ifdef CLOSURE_GLOSSY 6524 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 6525 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 6526 #endif 6527 6528 #ifdef CLOSURE_CLEARCOAT 6529 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 6530 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 6531 vec3 out_spec_clear = vec3(0.0); 6532 #endif 6533 6534 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 6535 LightData ld = lights_data[i]; 6536 6537 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 6538 l_vector.xyz = ld.l_position - worldPosition; 6539 l_vector.w = length(l_vector.xyz); 6540 6541 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 6542 6543 if (l_vis < 1e-8) { 6544 continue; 6545 } 6546 6547 vec3 l_color_vis = ld.l_color * l_vis; 6548 6549 #ifdef CLOSURE_DIFFUSE 6550 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 6551 #endif 6552 6553 #ifdef CLOSURE_SUBSURFACE 6554 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 6555 #endif 6556 6557 #ifdef CLOSURE_GLOSSY 6558 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 6559 #endif 6560 6561 #ifdef CLOSURE_CLEARCOAT 6562 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 6563 ld.l_spec; 6564 #endif 6565 } 6566 6567 #ifdef CLOSURE_GLOSSY 6568 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 6569 out_spec *= F_area(f0, brdf_lut_lights.xy); 6570 #endif 6571 6572 #ifdef CLOSURE_CLEARCOAT 6573 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 6574 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 6575 out_spec += out_spec_clear * C_intensity; 6576 #endif 6577 6578 /* ---------------------------------------------------------------- */ 6579 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 6580 /* ---------------------------------------------------------------- */ 6581 6582 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 6583 #ifdef CLOSURE_GLOSSY 6584 vec4 spec_accum = vec4(0.0); 6585 #endif 6586 6587 #ifdef CLOSURE_CLEARCOAT 6588 vec4 C_spec_accum = vec4(0.0); 6589 #endif 6590 6591 #ifdef CLOSURE_REFRACTION 6592 vec4 refr_accum = vec4(0.0); 6593 #endif 6594 6595 #ifdef CLOSURE_GLOSSY 6596 /* ---------------------------- */ 6597 /* Planar Reflections */ 6598 /* ---------------------------- */ 6599 6600 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 6601 PlanarData pd = planars_data[i]; 6602 6603 /* Fade on geometric normal. */ 6604 float fade = probe_attenuation_planar( 6605 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 6606 6607 if (fade > 0.0) { 6608 if (!(ssrToggle && ssr_id == outputSsrId)) { 6609 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 6610 accumulate_light(spec, fade, spec_accum); 6611 } 6612 6613 #ifdef CLOSURE_CLEARCOAT 6614 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 6615 accumulate_light(C_spec, fade, C_spec_accum); 6616 #endif 6617 } 6618 } 6619 #endif 6620 6621 #ifdef CLOSURE_GLOSSY 6622 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 6623 #endif 6624 6625 #ifdef CLOSURE_CLEARCOAT 6626 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 6627 #endif 6628 6629 #ifdef CLOSURE_REFRACTION 6630 /* Refract the view vector using the depth heuristic. 6631 * Then later Refract a second time the already refracted 6632 * ray using the inverse ior. */ 6633 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 6634 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 6635 vec3 refr_pos = (refractionDepth > 0.0) ? 6636 line_plane_intersect( 6637 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 6638 worldPosition; 6639 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 6640 #endif 6641 6642 #ifdef CLOSURE_REFRACTION 6643 /* ---------------------------- */ 6644 /* Screen Space Refraction */ 6645 /* ---------------------------- */ 6646 #ifdef USE_REFRACTION 6647 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 6648 /* Find approximated position of the 2nd refraction event. */ 6649 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 6650 viewPosition; 6651 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 6652 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 6653 accumulate_light(trans.rgb, trans.a, refr_accum); 6654 } 6655 #endif 6656 6657 #endif 6658 6659 /* ---------------------------- */ 6660 /* Specular probes */ 6661 /* ---------------------------- */ 6662 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6663 6664 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 6665 # define GLASS_ACCUM 1 6666 # define ACCUM min(refr_accum.a, spec_accum.a) 6667 #elif defined(CLOSURE_REFRACTION) 6668 # define GLASS_ACCUM 0 6669 # define ACCUM refr_accum.a 6670 #else 6671 # define GLASS_ACCUM 0 6672 # define ACCUM spec_accum.a 6673 #endif 6674 6675 /* Starts at 1 because 0 is world probe */ 6676 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 6677 float fade = probe_attenuation_cube(i, worldPosition); 6678 6679 if (fade > 0.0) { 6680 6681 #if GLASS_ACCUM 6682 if (spec_accum.a < 0.999) { 6683 #endif 6684 #ifdef CLOSURE_GLOSSY 6685 if (!(ssrToggle && ssr_id == outputSsrId)) { 6686 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 6687 accumulate_light(spec, fade, spec_accum); 6688 } 6689 #endif 6690 6691 #ifdef CLOSURE_CLEARCOAT 6692 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 6693 accumulate_light(C_spec, fade, C_spec_accum); 6694 #endif 6695 #if GLASS_ACCUM 6696 } 6697 #endif 6698 6699 #if GLASS_ACCUM 6700 if (refr_accum.a < 0.999) { 6701 #endif 6702 #ifdef CLOSURE_REFRACTION 6703 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 6704 accumulate_light(trans, fade, refr_accum); 6705 #endif 6706 #if GLASS_ACCUM 6707 } 6708 #endif 6709 } 6710 } 6711 6712 #undef GLASS_ACCUM 6713 #undef ACCUM 6714 6715 /* ---------------------------- */ 6716 /* World Probe */ 6717 /* ---------------------------- */ 6718 #ifdef CLOSURE_GLOSSY 6719 if (spec_accum.a < 0.999) { 6720 if (!(ssrToggle && ssr_id == outputSsrId)) { 6721 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 6722 accumulate_light(spec, 1.0, spec_accum); 6723 } 6724 6725 # ifdef CLOSURE_CLEARCOAT 6726 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 6727 accumulate_light(C_spec, 1.0, C_spec_accum); 6728 # endif 6729 } 6730 #endif 6731 6732 #ifdef CLOSURE_REFRACTION 6733 if (refr_accum.a < 0.999) { 6734 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 6735 accumulate_light(trans, 1.0, refr_accum); 6736 } 6737 #endif 6738 #endif /* Specular probes */ 6739 6740 /* ---------------------------- */ 6741 /* Ambient Occlusion */ 6742 /* ---------------------------- */ 6743 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 6744 vec3 bent_normal; 6745 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 6746 #endif 6747 6748 /* ---------------------------- */ 6749 /* Specular Output */ 6750 /* ---------------------------- */ 6751 float NV = dot(N, V); 6752 #ifdef CLOSURE_GLOSSY 6753 vec2 uv = lut_coords(NV, roughness); 6754 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 6755 6756 /* This factor is outputted to be used by SSR in order 6757 * to match the intensity of the regular reflections. */ 6758 ssr_spec = F_ibl(f0, brdf_lut); 6759 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 6760 6761 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 6762 if (ssrToggle && ssr_id == outputSsrId) { 6763 spec_occlu = 1.0; 6764 } 6765 6766 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 6767 #endif 6768 6769 #ifdef CLOSURE_REFRACTION 6770 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 6771 6772 out_refr += refr_accum.rgb * btdf; 6773 #endif 6774 6775 #ifdef CLOSURE_CLEARCOAT 6776 NV = dot(C_N, V); 6777 vec2 C_uv = lut_coords(NV, C_roughness); 6778 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 6779 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 6780 6781 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 6782 #endif 6783 6784 #ifdef CLOSURE_GLOSSY 6785 /* Global toggle for lightprobe baking. */ 6786 out_spec *= float(specToggle); 6787 #endif 6788 6789 /* ---------------------------------------------------------------- */ 6790 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 6791 /* ---------------------------------------------------------------- */ 6792 6793 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 6794 #ifdef CLOSURE_DIFFUSE 6795 vec4 diff_accum = vec4(0.0); 6796 6797 /* ---------------------------- */ 6798 /* Irradiance Grids */ 6799 /* ---------------------------- */ 6800 /* Start at 1 because 0 is world irradiance */ 6801 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 6802 GridData gd = grids_data[i]; 6803 6804 vec3 localpos; 6805 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 6806 6807 if (fade > 0.0) { 6808 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 6809 accumulate_light(diff, fade, diff_accum); 6810 } 6811 } 6812 6813 /* ---------------------------- */ 6814 /* World Diffuse */ 6815 /* ---------------------------- */ 6816 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 6817 vec3 diff = probe_evaluate_world_diff(bent_normal); 6818 accumulate_light(diff, 1.0, diff_accum); 6819 } 6820 6821 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 6822 #endif 6823 } 6824 6825 /* Cleanup for next configuration */ 6826 #undef CLOSURE_NAME 6827 6828 #ifdef CLOSURE_DIFFUSE 6829 #undef CLOSURE_DIFFUSE 6830 #endif 6831 6832 #ifdef CLOSURE_GLOSSY 6833 #undef CLOSURE_GLOSSY 6834 #endif 6835 6836 #ifdef CLOSURE_CLEARCOAT 6837 #undef CLOSURE_CLEARCOAT 6838 #endif 6839 6840 #ifdef CLOSURE_REFRACTION 6841 #undef CLOSURE_REFRACTION 6842 #endif 6843 6844 #ifdef CLOSURE_SUBSURFACE 6845 #undef CLOSURE_SUBSURFACE 6846 #endif 6847 6848 #ifndef LIT_SURFACE_UNIFORM 6849 #define LIT_SURFACE_UNIFORM 6850 6851 uniform float refractionDepth; 6852 6853 #ifndef UTIL_TEX 6854 # define UTIL_TEX 6855 uniform sampler2DArray utilTex; 6856 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 6857 #endif /* UTIL_TEX */ 6858 6859 in vec3 worldPosition; 6860 in vec3 viewPosition; 6861 6862 #ifdef USE_FLAT_NORMAL 6863 flat in vec3 worldNormal; 6864 flat in vec3 viewNormal; 6865 #else 6866 in vec3 worldNormal; 6867 in vec3 viewNormal; 6868 #endif 6869 6870 #ifdef HAIR_SHADER 6871 in vec3 hairTangent; /* world space */ 6872 in float hairThickTime; 6873 in float hairThickness; 6874 in float hairTime; 6875 flat in int hairStrandID; 6876 6877 uniform int hairThicknessRes = 1; 6878 #endif 6879 6880 #endif /* LIT_SURFACE_UNIFORM */ 6881 6882 /** AUTO CONFIG 6883 * We include the file multiple times each time with a different configuration. 6884 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 6885 */ 6886 #if !defined(SURFACE_DEFAULT) 6887 #define SURFACE_DEFAULT 6888 #define CLOSURE_NAME eevee_closure_default 6889 #define CLOSURE_DIFFUSE 6890 #define CLOSURE_GLOSSY 6891 #endif /* SURFACE_DEFAULT */ 6892 6893 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 6894 #define SURFACE_PRINCIPLED 6895 #define CLOSURE_NAME eevee_closure_principled 6896 #define CLOSURE_DIFFUSE 6897 #define CLOSURE_GLOSSY 6898 #define CLOSURE_CLEARCOAT 6899 #define CLOSURE_REFRACTION 6900 #define CLOSURE_SUBSURFACE 6901 #endif /* SURFACE_PRINCIPLED */ 6902 6903 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 6904 #define SURFACE_CLEARCOAT 6905 #define CLOSURE_NAME eevee_closure_clearcoat 6906 #define CLOSURE_GLOSSY 6907 #define CLOSURE_CLEARCOAT 6908 #endif /* SURFACE_CLEARCOAT */ 6909 6910 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 6911 #define SURFACE_DIFFUSE 6912 #define CLOSURE_NAME eevee_closure_diffuse 6913 #define CLOSURE_DIFFUSE 6914 #endif /* SURFACE_DIFFUSE */ 6915 6916 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 6917 #define SURFACE_SUBSURFACE 6918 #define CLOSURE_NAME eevee_closure_subsurface 6919 #define CLOSURE_DIFFUSE 6920 #define CLOSURE_SUBSURFACE 6921 #endif /* SURFACE_SUBSURFACE */ 6922 6923 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 6924 #define SURFACE_SKIN 6925 #define CLOSURE_NAME eevee_closure_skin 6926 #define CLOSURE_DIFFUSE 6927 #define CLOSURE_SUBSURFACE 6928 #define CLOSURE_GLOSSY 6929 #endif /* SURFACE_SKIN */ 6930 6931 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 6932 #define SURFACE_GLOSSY 6933 #define CLOSURE_NAME eevee_closure_glossy 6934 #define CLOSURE_GLOSSY 6935 #endif /* SURFACE_GLOSSY */ 6936 6937 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 6938 #define SURFACE_REFRACT 6939 #define CLOSURE_NAME eevee_closure_refraction 6940 #define CLOSURE_REFRACTION 6941 #endif /* SURFACE_REFRACT */ 6942 6943 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 6944 #define SURFACE_GLASS 6945 #define CLOSURE_NAME eevee_closure_glass 6946 #define CLOSURE_GLOSSY 6947 #define CLOSURE_REFRACTION 6948 #endif /* SURFACE_GLASS */ 6949 6950 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 6951 #ifdef CLOSURE_CLEARCOAT 6952 #ifndef CLOSURE_GLOSSY 6953 # define CLOSURE_GLOSSY 6954 #endif 6955 #endif /* CLOSURE_CLEARCOAT */ 6956 6957 void CLOSURE_NAME(vec3 N 6958 #ifdef CLOSURE_DIFFUSE 6959 , 6960 vec3 albedo 6961 #endif 6962 #ifdef CLOSURE_GLOSSY 6963 , 6964 vec3 f0, 6965 int ssr_id 6966 #endif 6967 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6968 , 6969 float roughness 6970 #endif 6971 #ifdef CLOSURE_CLEARCOAT 6972 , 6973 vec3 C_N, 6974 float C_intensity, 6975 float C_roughness 6976 #endif 6977 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 6978 , 6979 float ao 6980 #endif 6981 #ifdef CLOSURE_SUBSURFACE 6982 , 6983 float sss_scale 6984 #endif 6985 #ifdef CLOSURE_REFRACTION 6986 , 6987 float ior 6988 #endif 6989 #ifdef CLOSURE_DIFFUSE 6990 , 6991 out vec3 out_diff 6992 #endif 6993 #ifdef CLOSURE_SUBSURFACE 6994 , 6995 out vec3 out_trans 6996 #endif 6997 #ifdef CLOSURE_GLOSSY 6998 , 6999 out vec3 out_spec 7000 #endif 7001 #ifdef CLOSURE_REFRACTION 7002 , 7003 out vec3 out_refr 7004 #endif 7005 #ifdef CLOSURE_GLOSSY 7006 , 7007 out vec3 ssr_spec 7008 #endif 7009 ) 7010 { 7011 #ifdef CLOSURE_DIFFUSE 7012 out_diff = vec3(0.0); 7013 #endif 7014 7015 #ifdef CLOSURE_SUBSURFACE 7016 out_trans = vec3(0.0); 7017 #endif 7018 7019 #ifdef CLOSURE_GLOSSY 7020 out_spec = vec3(0.0); 7021 #endif 7022 7023 #ifdef CLOSURE_REFRACTION 7024 out_refr = vec3(0.0); 7025 #endif 7026 7027 #ifdef SHADOW_SHADER 7028 return; 7029 #endif 7030 7031 /* Zero length vectors cause issues, see: T51979. */ 7032 float len = length(N); 7033 if (isnan(len)) { 7034 return; 7035 } 7036 N /= len; 7037 7038 #ifdef CLOSURE_CLEARCOAT 7039 len = length(C_N); 7040 if (isnan(len)) { 7041 return; 7042 } 7043 C_N /= len; 7044 #endif 7045 7046 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7047 roughness = clamp(roughness, 1e-8, 0.9999); 7048 float roughnessSquared = roughness * roughness; 7049 #endif 7050 7051 #ifdef CLOSURE_CLEARCOAT 7052 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 7053 float C_roughnessSquared = C_roughness * C_roughness; 7054 #endif 7055 7056 vec3 V = cameraVec; 7057 7058 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 7059 7060 /* ---------------------------------------------------------------- */ 7061 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 7062 /* ---------------------------------------------------------------- */ 7063 7064 #ifdef CLOSURE_GLOSSY 7065 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 7066 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 7067 #endif 7068 7069 #ifdef CLOSURE_CLEARCOAT 7070 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 7071 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 7072 vec3 out_spec_clear = vec3(0.0); 7073 #endif 7074 7075 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 7076 LightData ld = lights_data[i]; 7077 7078 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 7079 l_vector.xyz = ld.l_position - worldPosition; 7080 l_vector.w = length(l_vector.xyz); 7081 7082 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 7083 7084 if (l_vis < 1e-8) { 7085 continue; 7086 } 7087 7088 vec3 l_color_vis = ld.l_color * l_vis; 7089 7090 #ifdef CLOSURE_DIFFUSE 7091 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 7092 #endif 7093 7094 #ifdef CLOSURE_SUBSURFACE 7095 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 7096 #endif 7097 7098 #ifdef CLOSURE_GLOSSY 7099 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 7100 #endif 7101 7102 #ifdef CLOSURE_CLEARCOAT 7103 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 7104 ld.l_spec; 7105 #endif 7106 } 7107 7108 #ifdef CLOSURE_GLOSSY 7109 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 7110 out_spec *= F_area(f0, brdf_lut_lights.xy); 7111 #endif 7112 7113 #ifdef CLOSURE_CLEARCOAT 7114 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 7115 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 7116 out_spec += out_spec_clear * C_intensity; 7117 #endif 7118 7119 /* ---------------------------------------------------------------- */ 7120 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 7121 /* ---------------------------------------------------------------- */ 7122 7123 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 7124 #ifdef CLOSURE_GLOSSY 7125 vec4 spec_accum = vec4(0.0); 7126 #endif 7127 7128 #ifdef CLOSURE_CLEARCOAT 7129 vec4 C_spec_accum = vec4(0.0); 7130 #endif 7131 7132 #ifdef CLOSURE_REFRACTION 7133 vec4 refr_accum = vec4(0.0); 7134 #endif 7135 7136 #ifdef CLOSURE_GLOSSY 7137 /* ---------------------------- */ 7138 /* Planar Reflections */ 7139 /* ---------------------------- */ 7140 7141 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 7142 PlanarData pd = planars_data[i]; 7143 7144 /* Fade on geometric normal. */ 7145 float fade = probe_attenuation_planar( 7146 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 7147 7148 if (fade > 0.0) { 7149 if (!(ssrToggle && ssr_id == outputSsrId)) { 7150 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 7151 accumulate_light(spec, fade, spec_accum); 7152 } 7153 7154 #ifdef CLOSURE_CLEARCOAT 7155 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 7156 accumulate_light(C_spec, fade, C_spec_accum); 7157 #endif 7158 } 7159 } 7160 #endif 7161 7162 #ifdef CLOSURE_GLOSSY 7163 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 7164 #endif 7165 7166 #ifdef CLOSURE_CLEARCOAT 7167 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 7168 #endif 7169 7170 #ifdef CLOSURE_REFRACTION 7171 /* Refract the view vector using the depth heuristic. 7172 * Then later Refract a second time the already refracted 7173 * ray using the inverse ior. */ 7174 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 7175 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 7176 vec3 refr_pos = (refractionDepth > 0.0) ? 7177 line_plane_intersect( 7178 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 7179 worldPosition; 7180 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 7181 #endif 7182 7183 #ifdef CLOSURE_REFRACTION 7184 /* ---------------------------- */ 7185 /* Screen Space Refraction */ 7186 /* ---------------------------- */ 7187 #ifdef USE_REFRACTION 7188 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 7189 /* Find approximated position of the 2nd refraction event. */ 7190 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 7191 viewPosition; 7192 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 7193 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 7194 accumulate_light(trans.rgb, trans.a, refr_accum); 7195 } 7196 #endif 7197 7198 #endif 7199 7200 /* ---------------------------- */ 7201 /* Specular probes */ 7202 /* ---------------------------- */ 7203 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7204 7205 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 7206 # define GLASS_ACCUM 1 7207 # define ACCUM min(refr_accum.a, spec_accum.a) 7208 #elif defined(CLOSURE_REFRACTION) 7209 # define GLASS_ACCUM 0 7210 # define ACCUM refr_accum.a 7211 #else 7212 # define GLASS_ACCUM 0 7213 # define ACCUM spec_accum.a 7214 #endif 7215 7216 /* Starts at 1 because 0 is world probe */ 7217 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 7218 float fade = probe_attenuation_cube(i, worldPosition); 7219 7220 if (fade > 0.0) { 7221 7222 #if GLASS_ACCUM 7223 if (spec_accum.a < 0.999) { 7224 #endif 7225 #ifdef CLOSURE_GLOSSY 7226 if (!(ssrToggle && ssr_id == outputSsrId)) { 7227 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 7228 accumulate_light(spec, fade, spec_accum); 7229 } 7230 #endif 7231 7232 #ifdef CLOSURE_CLEARCOAT 7233 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 7234 accumulate_light(C_spec, fade, C_spec_accum); 7235 #endif 7236 #if GLASS_ACCUM 7237 } 7238 #endif 7239 7240 #if GLASS_ACCUM 7241 if (refr_accum.a < 0.999) { 7242 #endif 7243 #ifdef CLOSURE_REFRACTION 7244 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 7245 accumulate_light(trans, fade, refr_accum); 7246 #endif 7247 #if GLASS_ACCUM 7248 } 7249 #endif 7250 } 7251 } 7252 7253 #undef GLASS_ACCUM 7254 #undef ACCUM 7255 7256 /* ---------------------------- */ 7257 /* World Probe */ 7258 /* ---------------------------- */ 7259 #ifdef CLOSURE_GLOSSY 7260 if (spec_accum.a < 0.999) { 7261 if (!(ssrToggle && ssr_id == outputSsrId)) { 7262 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 7263 accumulate_light(spec, 1.0, spec_accum); 7264 } 7265 7266 # ifdef CLOSURE_CLEARCOAT 7267 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 7268 accumulate_light(C_spec, 1.0, C_spec_accum); 7269 # endif 7270 } 7271 #endif 7272 7273 #ifdef CLOSURE_REFRACTION 7274 if (refr_accum.a < 0.999) { 7275 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 7276 accumulate_light(trans, 1.0, refr_accum); 7277 } 7278 #endif 7279 #endif /* Specular probes */ 7280 7281 /* ---------------------------- */ 7282 /* Ambient Occlusion */ 7283 /* ---------------------------- */ 7284 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 7285 vec3 bent_normal; 7286 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 7287 #endif 7288 7289 /* ---------------------------- */ 7290 /* Specular Output */ 7291 /* ---------------------------- */ 7292 float NV = dot(N, V); 7293 #ifdef CLOSURE_GLOSSY 7294 vec2 uv = lut_coords(NV, roughness); 7295 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 7296 7297 /* This factor is outputted to be used by SSR in order 7298 * to match the intensity of the regular reflections. */ 7299 ssr_spec = F_ibl(f0, brdf_lut); 7300 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 7301 7302 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 7303 if (ssrToggle && ssr_id == outputSsrId) { 7304 spec_occlu = 1.0; 7305 } 7306 7307 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 7308 #endif 7309 7310 #ifdef CLOSURE_REFRACTION 7311 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 7312 7313 out_refr += refr_accum.rgb * btdf; 7314 #endif 7315 7316 #ifdef CLOSURE_CLEARCOAT 7317 NV = dot(C_N, V); 7318 vec2 C_uv = lut_coords(NV, C_roughness); 7319 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 7320 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 7321 7322 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 7323 #endif 7324 7325 #ifdef CLOSURE_GLOSSY 7326 /* Global toggle for lightprobe baking. */ 7327 out_spec *= float(specToggle); 7328 #endif 7329 7330 /* ---------------------------------------------------------------- */ 7331 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 7332 /* ---------------------------------------------------------------- */ 7333 7334 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 7335 #ifdef CLOSURE_DIFFUSE 7336 vec4 diff_accum = vec4(0.0); 7337 7338 /* ---------------------------- */ 7339 /* Irradiance Grids */ 7340 /* ---------------------------- */ 7341 /* Start at 1 because 0 is world irradiance */ 7342 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 7343 GridData gd = grids_data[i]; 7344 7345 vec3 localpos; 7346 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 7347 7348 if (fade > 0.0) { 7349 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 7350 accumulate_light(diff, fade, diff_accum); 7351 } 7352 } 7353 7354 /* ---------------------------- */ 7355 /* World Diffuse */ 7356 /* ---------------------------- */ 7357 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 7358 vec3 diff = probe_evaluate_world_diff(bent_normal); 7359 accumulate_light(diff, 1.0, diff_accum); 7360 } 7361 7362 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 7363 #endif 7364 } 7365 7366 /* Cleanup for next configuration */ 7367 #undef CLOSURE_NAME 7368 7369 #ifdef CLOSURE_DIFFUSE 7370 #undef CLOSURE_DIFFUSE 7371 #endif 7372 7373 #ifdef CLOSURE_GLOSSY 7374 #undef CLOSURE_GLOSSY 7375 #endif 7376 7377 #ifdef CLOSURE_CLEARCOAT 7378 #undef CLOSURE_CLEARCOAT 7379 #endif 7380 7381 #ifdef CLOSURE_REFRACTION 7382 #undef CLOSURE_REFRACTION 7383 #endif 7384 7385 #ifdef CLOSURE_SUBSURFACE 7386 #undef CLOSURE_SUBSURFACE 7387 #endif 7388 7389 #ifndef LIT_SURFACE_UNIFORM 7390 #define LIT_SURFACE_UNIFORM 7391 7392 uniform float refractionDepth; 7393 7394 #ifndef UTIL_TEX 7395 # define UTIL_TEX 7396 uniform sampler2DArray utilTex; 7397 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 7398 #endif /* UTIL_TEX */ 7399 7400 in vec3 worldPosition; 7401 in vec3 viewPosition; 7402 7403 #ifdef USE_FLAT_NORMAL 7404 flat in vec3 worldNormal; 7405 flat in vec3 viewNormal; 7406 #else 7407 in vec3 worldNormal; 7408 in vec3 viewNormal; 7409 #endif 7410 7411 #ifdef HAIR_SHADER 7412 in vec3 hairTangent; /* world space */ 7413 in float hairThickTime; 7414 in float hairThickness; 7415 in float hairTime; 7416 flat in int hairStrandID; 7417 7418 uniform int hairThicknessRes = 1; 7419 #endif 7420 7421 #endif /* LIT_SURFACE_UNIFORM */ 7422 7423 /** AUTO CONFIG 7424 * We include the file multiple times each time with a different configuration. 7425 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 7426 */ 7427 #if !defined(SURFACE_DEFAULT) 7428 #define SURFACE_DEFAULT 7429 #define CLOSURE_NAME eevee_closure_default 7430 #define CLOSURE_DIFFUSE 7431 #define CLOSURE_GLOSSY 7432 #endif /* SURFACE_DEFAULT */ 7433 7434 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 7435 #define SURFACE_PRINCIPLED 7436 #define CLOSURE_NAME eevee_closure_principled 7437 #define CLOSURE_DIFFUSE 7438 #define CLOSURE_GLOSSY 7439 #define CLOSURE_CLEARCOAT 7440 #define CLOSURE_REFRACTION 7441 #define CLOSURE_SUBSURFACE 7442 #endif /* SURFACE_PRINCIPLED */ 7443 7444 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 7445 #define SURFACE_CLEARCOAT 7446 #define CLOSURE_NAME eevee_closure_clearcoat 7447 #define CLOSURE_GLOSSY 7448 #define CLOSURE_CLEARCOAT 7449 #endif /* SURFACE_CLEARCOAT */ 7450 7451 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 7452 #define SURFACE_DIFFUSE 7453 #define CLOSURE_NAME eevee_closure_diffuse 7454 #define CLOSURE_DIFFUSE 7455 #endif /* SURFACE_DIFFUSE */ 7456 7457 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 7458 #define SURFACE_SUBSURFACE 7459 #define CLOSURE_NAME eevee_closure_subsurface 7460 #define CLOSURE_DIFFUSE 7461 #define CLOSURE_SUBSURFACE 7462 #endif /* SURFACE_SUBSURFACE */ 7463 7464 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 7465 #define SURFACE_SKIN 7466 #define CLOSURE_NAME eevee_closure_skin 7467 #define CLOSURE_DIFFUSE 7468 #define CLOSURE_SUBSURFACE 7469 #define CLOSURE_GLOSSY 7470 #endif /* SURFACE_SKIN */ 7471 7472 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 7473 #define SURFACE_GLOSSY 7474 #define CLOSURE_NAME eevee_closure_glossy 7475 #define CLOSURE_GLOSSY 7476 #endif /* SURFACE_GLOSSY */ 7477 7478 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 7479 #define SURFACE_REFRACT 7480 #define CLOSURE_NAME eevee_closure_refraction 7481 #define CLOSURE_REFRACTION 7482 #endif /* SURFACE_REFRACT */ 7483 7484 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 7485 #define SURFACE_GLASS 7486 #define CLOSURE_NAME eevee_closure_glass 7487 #define CLOSURE_GLOSSY 7488 #define CLOSURE_REFRACTION 7489 #endif /* SURFACE_GLASS */ 7490 7491 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 7492 #ifdef CLOSURE_CLEARCOAT 7493 #ifndef CLOSURE_GLOSSY 7494 # define CLOSURE_GLOSSY 7495 #endif 7496 #endif /* CLOSURE_CLEARCOAT */ 7497 7498 void CLOSURE_NAME(vec3 N 7499 #ifdef CLOSURE_DIFFUSE 7500 , 7501 vec3 albedo 7502 #endif 7503 #ifdef CLOSURE_GLOSSY 7504 , 7505 vec3 f0, 7506 int ssr_id 7507 #endif 7508 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7509 , 7510 float roughness 7511 #endif 7512 #ifdef CLOSURE_CLEARCOAT 7513 , 7514 vec3 C_N, 7515 float C_intensity, 7516 float C_roughness 7517 #endif 7518 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 7519 , 7520 float ao 7521 #endif 7522 #ifdef CLOSURE_SUBSURFACE 7523 , 7524 float sss_scale 7525 #endif 7526 #ifdef CLOSURE_REFRACTION 7527 , 7528 float ior 7529 #endif 7530 #ifdef CLOSURE_DIFFUSE 7531 , 7532 out vec3 out_diff 7533 #endif 7534 #ifdef CLOSURE_SUBSURFACE 7535 , 7536 out vec3 out_trans 7537 #endif 7538 #ifdef CLOSURE_GLOSSY 7539 , 7540 out vec3 out_spec 7541 #endif 7542 #ifdef CLOSURE_REFRACTION 7543 , 7544 out vec3 out_refr 7545 #endif 7546 #ifdef CLOSURE_GLOSSY 7547 , 7548 out vec3 ssr_spec 7549 #endif 7550 ) 7551 { 7552 #ifdef CLOSURE_DIFFUSE 7553 out_diff = vec3(0.0); 7554 #endif 7555 7556 #ifdef CLOSURE_SUBSURFACE 7557 out_trans = vec3(0.0); 7558 #endif 7559 7560 #ifdef CLOSURE_GLOSSY 7561 out_spec = vec3(0.0); 7562 #endif 7563 7564 #ifdef CLOSURE_REFRACTION 7565 out_refr = vec3(0.0); 7566 #endif 7567 7568 #ifdef SHADOW_SHADER 7569 return; 7570 #endif 7571 7572 /* Zero length vectors cause issues, see: T51979. */ 7573 float len = length(N); 7574 if (isnan(len)) { 7575 return; 7576 } 7577 N /= len; 7578 7579 #ifdef CLOSURE_CLEARCOAT 7580 len = length(C_N); 7581 if (isnan(len)) { 7582 return; 7583 } 7584 C_N /= len; 7585 #endif 7586 7587 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7588 roughness = clamp(roughness, 1e-8, 0.9999); 7589 float roughnessSquared = roughness * roughness; 7590 #endif 7591 7592 #ifdef CLOSURE_CLEARCOAT 7593 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 7594 float C_roughnessSquared = C_roughness * C_roughness; 7595 #endif 7596 7597 vec3 V = cameraVec; 7598 7599 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 7600 7601 /* ---------------------------------------------------------------- */ 7602 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 7603 /* ---------------------------------------------------------------- */ 7604 7605 #ifdef CLOSURE_GLOSSY 7606 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 7607 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 7608 #endif 7609 7610 #ifdef CLOSURE_CLEARCOAT 7611 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 7612 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 7613 vec3 out_spec_clear = vec3(0.0); 7614 #endif 7615 7616 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 7617 LightData ld = lights_data[i]; 7618 7619 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 7620 l_vector.xyz = ld.l_position - worldPosition; 7621 l_vector.w = length(l_vector.xyz); 7622 7623 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 7624 7625 if (l_vis < 1e-8) { 7626 continue; 7627 } 7628 7629 vec3 l_color_vis = ld.l_color * l_vis; 7630 7631 #ifdef CLOSURE_DIFFUSE 7632 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 7633 #endif 7634 7635 #ifdef CLOSURE_SUBSURFACE 7636 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 7637 #endif 7638 7639 #ifdef CLOSURE_GLOSSY 7640 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 7641 #endif 7642 7643 #ifdef CLOSURE_CLEARCOAT 7644 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 7645 ld.l_spec; 7646 #endif 7647 } 7648 7649 #ifdef CLOSURE_GLOSSY 7650 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 7651 out_spec *= F_area(f0, brdf_lut_lights.xy); 7652 #endif 7653 7654 #ifdef CLOSURE_CLEARCOAT 7655 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 7656 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 7657 out_spec += out_spec_clear * C_intensity; 7658 #endif 7659 7660 /* ---------------------------------------------------------------- */ 7661 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 7662 /* ---------------------------------------------------------------- */ 7663 7664 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 7665 #ifdef CLOSURE_GLOSSY 7666 vec4 spec_accum = vec4(0.0); 7667 #endif 7668 7669 #ifdef CLOSURE_CLEARCOAT 7670 vec4 C_spec_accum = vec4(0.0); 7671 #endif 7672 7673 #ifdef CLOSURE_REFRACTION 7674 vec4 refr_accum = vec4(0.0); 7675 #endif 7676 7677 #ifdef CLOSURE_GLOSSY 7678 /* ---------------------------- */ 7679 /* Planar Reflections */ 7680 /* ---------------------------- */ 7681 7682 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 7683 PlanarData pd = planars_data[i]; 7684 7685 /* Fade on geometric normal. */ 7686 float fade = probe_attenuation_planar( 7687 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 7688 7689 if (fade > 0.0) { 7690 if (!(ssrToggle && ssr_id == outputSsrId)) { 7691 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 7692 accumulate_light(spec, fade, spec_accum); 7693 } 7694 7695 #ifdef CLOSURE_CLEARCOAT 7696 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 7697 accumulate_light(C_spec, fade, C_spec_accum); 7698 #endif 7699 } 7700 } 7701 #endif 7702 7703 #ifdef CLOSURE_GLOSSY 7704 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 7705 #endif 7706 7707 #ifdef CLOSURE_CLEARCOAT 7708 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 7709 #endif 7710 7711 #ifdef CLOSURE_REFRACTION 7712 /* Refract the view vector using the depth heuristic. 7713 * Then later Refract a second time the already refracted 7714 * ray using the inverse ior. */ 7715 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 7716 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 7717 vec3 refr_pos = (refractionDepth > 0.0) ? 7718 line_plane_intersect( 7719 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 7720 worldPosition; 7721 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 7722 #endif 7723 7724 #ifdef CLOSURE_REFRACTION 7725 /* ---------------------------- */ 7726 /* Screen Space Refraction */ 7727 /* ---------------------------- */ 7728 #ifdef USE_REFRACTION 7729 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 7730 /* Find approximated position of the 2nd refraction event. */ 7731 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 7732 viewPosition; 7733 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 7734 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 7735 accumulate_light(trans.rgb, trans.a, refr_accum); 7736 } 7737 #endif 7738 7739 #endif 7740 7741 /* ---------------------------- */ 7742 /* Specular probes */ 7743 /* ---------------------------- */ 7744 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7745 7746 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 7747 # define GLASS_ACCUM 1 7748 # define ACCUM min(refr_accum.a, spec_accum.a) 7749 #elif defined(CLOSURE_REFRACTION) 7750 # define GLASS_ACCUM 0 7751 # define ACCUM refr_accum.a 7752 #else 7753 # define GLASS_ACCUM 0 7754 # define ACCUM spec_accum.a 7755 #endif 7756 7757 /* Starts at 1 because 0 is world probe */ 7758 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 7759 float fade = probe_attenuation_cube(i, worldPosition); 7760 7761 if (fade > 0.0) { 7762 7763 #if GLASS_ACCUM 7764 if (spec_accum.a < 0.999) { 7765 #endif 7766 #ifdef CLOSURE_GLOSSY 7767 if (!(ssrToggle && ssr_id == outputSsrId)) { 7768 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 7769 accumulate_light(spec, fade, spec_accum); 7770 } 7771 #endif 7772 7773 #ifdef CLOSURE_CLEARCOAT 7774 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 7775 accumulate_light(C_spec, fade, C_spec_accum); 7776 #endif 7777 #if GLASS_ACCUM 7778 } 7779 #endif 7780 7781 #if GLASS_ACCUM 7782 if (refr_accum.a < 0.999) { 7783 #endif 7784 #ifdef CLOSURE_REFRACTION 7785 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 7786 accumulate_light(trans, fade, refr_accum); 7787 #endif 7788 #if GLASS_ACCUM 7789 } 7790 #endif 7791 } 7792 } 7793 7794 #undef GLASS_ACCUM 7795 #undef ACCUM 7796 7797 /* ---------------------------- */ 7798 /* World Probe */ 7799 /* ---------------------------- */ 7800 #ifdef CLOSURE_GLOSSY 7801 if (spec_accum.a < 0.999) { 7802 if (!(ssrToggle && ssr_id == outputSsrId)) { 7803 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 7804 accumulate_light(spec, 1.0, spec_accum); 7805 } 7806 7807 # ifdef CLOSURE_CLEARCOAT 7808 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 7809 accumulate_light(C_spec, 1.0, C_spec_accum); 7810 # endif 7811 } 7812 #endif 7813 7814 #ifdef CLOSURE_REFRACTION 7815 if (refr_accum.a < 0.999) { 7816 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 7817 accumulate_light(trans, 1.0, refr_accum); 7818 } 7819 #endif 7820 #endif /* Specular probes */ 7821 7822 /* ---------------------------- */ 7823 /* Ambient Occlusion */ 7824 /* ---------------------------- */ 7825 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 7826 vec3 bent_normal; 7827 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 7828 #endif 7829 7830 /* ---------------------------- */ 7831 /* Specular Output */ 7832 /* ---------------------------- */ 7833 float NV = dot(N, V); 7834 #ifdef CLOSURE_GLOSSY 7835 vec2 uv = lut_coords(NV, roughness); 7836 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 7837 7838 /* This factor is outputted to be used by SSR in order 7839 * to match the intensity of the regular reflections. */ 7840 ssr_spec = F_ibl(f0, brdf_lut); 7841 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 7842 7843 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 7844 if (ssrToggle && ssr_id == outputSsrId) { 7845 spec_occlu = 1.0; 7846 } 7847 7848 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 7849 #endif 7850 7851 #ifdef CLOSURE_REFRACTION 7852 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 7853 7854 out_refr += refr_accum.rgb * btdf; 7855 #endif 7856 7857 #ifdef CLOSURE_CLEARCOAT 7858 NV = dot(C_N, V); 7859 vec2 C_uv = lut_coords(NV, C_roughness); 7860 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 7861 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 7862 7863 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 7864 #endif 7865 7866 #ifdef CLOSURE_GLOSSY 7867 /* Global toggle for lightprobe baking. */ 7868 out_spec *= float(specToggle); 7869 #endif 7870 7871 /* ---------------------------------------------------------------- */ 7872 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 7873 /* ---------------------------------------------------------------- */ 7874 7875 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 7876 #ifdef CLOSURE_DIFFUSE 7877 vec4 diff_accum = vec4(0.0); 7878 7879 /* ---------------------------- */ 7880 /* Irradiance Grids */ 7881 /* ---------------------------- */ 7882 /* Start at 1 because 0 is world irradiance */ 7883 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 7884 GridData gd = grids_data[i]; 7885 7886 vec3 localpos; 7887 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 7888 7889 if (fade > 0.0) { 7890 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 7891 accumulate_light(diff, fade, diff_accum); 7892 } 7893 } 7894 7895 /* ---------------------------- */ 7896 /* World Diffuse */ 7897 /* ---------------------------- */ 7898 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 7899 vec3 diff = probe_evaluate_world_diff(bent_normal); 7900 accumulate_light(diff, 1.0, diff_accum); 7901 } 7902 7903 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 7904 #endif 7905 } 7906 7907 /* Cleanup for next configuration */ 7908 #undef CLOSURE_NAME 7909 7910 #ifdef CLOSURE_DIFFUSE 7911 #undef CLOSURE_DIFFUSE 7912 #endif 7913 7914 #ifdef CLOSURE_GLOSSY 7915 #undef CLOSURE_GLOSSY 7916 #endif 7917 7918 #ifdef CLOSURE_CLEARCOAT 7919 #undef CLOSURE_CLEARCOAT 7920 #endif 7921 7922 #ifdef CLOSURE_REFRACTION 7923 #undef CLOSURE_REFRACTION 7924 #endif 7925 7926 #ifdef CLOSURE_SUBSURFACE 7927 #undef CLOSURE_SUBSURFACE 7928 #endif 7929 7930 #ifndef LIT_SURFACE_UNIFORM 7931 #define LIT_SURFACE_UNIFORM 7932 7933 uniform float refractionDepth; 7934 7935 #ifndef UTIL_TEX 7936 # define UTIL_TEX 7937 uniform sampler2DArray utilTex; 7938 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 7939 #endif /* UTIL_TEX */ 7940 7941 in vec3 worldPosition; 7942 in vec3 viewPosition; 7943 7944 #ifdef USE_FLAT_NORMAL 7945 flat in vec3 worldNormal; 7946 flat in vec3 viewNormal; 7947 #else 7948 in vec3 worldNormal; 7949 in vec3 viewNormal; 7950 #endif 7951 7952 #ifdef HAIR_SHADER 7953 in vec3 hairTangent; /* world space */ 7954 in float hairThickTime; 7955 in float hairThickness; 7956 in float hairTime; 7957 flat in int hairStrandID; 7958 7959 uniform int hairThicknessRes = 1; 7960 #endif 7961 7962 #endif /* LIT_SURFACE_UNIFORM */ 7963 7964 /** AUTO CONFIG 7965 * We include the file multiple times each time with a different configuration. 7966 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 7967 */ 7968 #if !defined(SURFACE_DEFAULT) 7969 #define SURFACE_DEFAULT 7970 #define CLOSURE_NAME eevee_closure_default 7971 #define CLOSURE_DIFFUSE 7972 #define CLOSURE_GLOSSY 7973 #endif /* SURFACE_DEFAULT */ 7974 7975 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 7976 #define SURFACE_PRINCIPLED 7977 #define CLOSURE_NAME eevee_closure_principled 7978 #define CLOSURE_DIFFUSE 7979 #define CLOSURE_GLOSSY 7980 #define CLOSURE_CLEARCOAT 7981 #define CLOSURE_REFRACTION 7982 #define CLOSURE_SUBSURFACE 7983 #endif /* SURFACE_PRINCIPLED */ 7984 7985 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 7986 #define SURFACE_CLEARCOAT 7987 #define CLOSURE_NAME eevee_closure_clearcoat 7988 #define CLOSURE_GLOSSY 7989 #define CLOSURE_CLEARCOAT 7990 #endif /* SURFACE_CLEARCOAT */ 7991 7992 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 7993 #define SURFACE_DIFFUSE 7994 #define CLOSURE_NAME eevee_closure_diffuse 7995 #define CLOSURE_DIFFUSE 7996 #endif /* SURFACE_DIFFUSE */ 7997 7998 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 7999 #define SURFACE_SUBSURFACE 8000 #define CLOSURE_NAME eevee_closure_subsurface 8001 #define CLOSURE_DIFFUSE 8002 #define CLOSURE_SUBSURFACE 8003 #endif /* SURFACE_SUBSURFACE */ 8004 8005 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 8006 #define SURFACE_SKIN 8007 #define CLOSURE_NAME eevee_closure_skin 8008 #define CLOSURE_DIFFUSE 8009 #define CLOSURE_SUBSURFACE 8010 #define CLOSURE_GLOSSY 8011 #endif /* SURFACE_SKIN */ 8012 8013 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 8014 #define SURFACE_GLOSSY 8015 #define CLOSURE_NAME eevee_closure_glossy 8016 #define CLOSURE_GLOSSY 8017 #endif /* SURFACE_GLOSSY */ 8018 8019 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 8020 #define SURFACE_REFRACT 8021 #define CLOSURE_NAME eevee_closure_refraction 8022 #define CLOSURE_REFRACTION 8023 #endif /* SURFACE_REFRACT */ 8024 8025 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 8026 #define SURFACE_GLASS 8027 #define CLOSURE_NAME eevee_closure_glass 8028 #define CLOSURE_GLOSSY 8029 #define CLOSURE_REFRACTION 8030 #endif /* SURFACE_GLASS */ 8031 8032 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 8033 #ifdef CLOSURE_CLEARCOAT 8034 #ifndef CLOSURE_GLOSSY 8035 # define CLOSURE_GLOSSY 8036 #endif 8037 #endif /* CLOSURE_CLEARCOAT */ 8038 8039 void CLOSURE_NAME(vec3 N 8040 #ifdef CLOSURE_DIFFUSE 8041 , 8042 vec3 albedo 8043 #endif 8044 #ifdef CLOSURE_GLOSSY 8045 , 8046 vec3 f0, 8047 int ssr_id 8048 #endif 8049 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 8050 , 8051 float roughness 8052 #endif 8053 #ifdef CLOSURE_CLEARCOAT 8054 , 8055 vec3 C_N, 8056 float C_intensity, 8057 float C_roughness 8058 #endif 8059 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 8060 , 8061 float ao 8062 #endif 8063 #ifdef CLOSURE_SUBSURFACE 8064 , 8065 float sss_scale 8066 #endif 8067 #ifdef CLOSURE_REFRACTION 8068 , 8069 float ior 8070 #endif 8071 #ifdef CLOSURE_DIFFUSE 8072 , 8073 out vec3 out_diff 8074 #endif 8075 #ifdef CLOSURE_SUBSURFACE 8076 , 8077 out vec3 out_trans 8078 #endif 8079 #ifdef CLOSURE_GLOSSY 8080 , 8081 out vec3 out_spec 8082 #endif 8083 #ifdef CLOSURE_REFRACTION 8084 , 8085 out vec3 out_refr 8086 #endif 8087 #ifdef CLOSURE_GLOSSY 8088 , 8089 out vec3 ssr_spec 8090 #endif 8091 ) 8092 { 8093 #ifdef CLOSURE_DIFFUSE 8094 out_diff = vec3(0.0); 8095 #endif 8096 8097 #ifdef CLOSURE_SUBSURFACE 8098 out_trans = vec3(0.0); 8099 #endif 8100 8101 #ifdef CLOSURE_GLOSSY 8102 out_spec = vec3(0.0); 8103 #endif 8104 8105 #ifdef CLOSURE_REFRACTION 8106 out_refr = vec3(0.0); 8107 #endif 8108 8109 #ifdef SHADOW_SHADER 8110 return; 8111 #endif 8112 8113 /* Zero length vectors cause issues, see: T51979. */ 8114 float len = length(N); 8115 if (isnan(len)) { 8116 return; 8117 } 8118 N /= len; 8119 8120 #ifdef CLOSURE_CLEARCOAT 8121 len = length(C_N); 8122 if (isnan(len)) { 8123 return; 8124 } 8125 C_N /= len; 8126 #endif 8127 8128 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 8129 roughness = clamp(roughness, 1e-8, 0.9999); 8130 float roughnessSquared = roughness * roughness; 8131 #endif 8132 8133 #ifdef CLOSURE_CLEARCOAT 8134 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 8135 float C_roughnessSquared = C_roughness * C_roughness; 8136 #endif 8137 8138 vec3 V = cameraVec; 8139 8140 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 8141 8142 /* ---------------------------------------------------------------- */ 8143 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 8144 /* ---------------------------------------------------------------- */ 8145 8146 #ifdef CLOSURE_GLOSSY 8147 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 8148 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 8149 #endif 8150 8151 #ifdef CLOSURE_CLEARCOAT 8152 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 8153 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 8154 vec3 out_spec_clear = vec3(0.0); 8155 #endif 8156 8157 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 8158 LightData ld = lights_data[i]; 8159 8160 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 8161 l_vector.xyz = ld.l_position - worldPosition; 8162 l_vector.w = length(l_vector.xyz); 8163 8164 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 8165 8166 if (l_vis < 1e-8) { 8167 continue; 8168 } 8169 8170 vec3 l_color_vis = ld.l_color * l_vis; 8171 8172 #ifdef CLOSURE_DIFFUSE 8173 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 8174 #endif 8175 8176 #ifdef CLOSURE_SUBSURFACE 8177 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 8178 #endif 8179 8180 #ifdef CLOSURE_GLOSSY 8181 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 8182 #endif 8183 8184 #ifdef CLOSURE_CLEARCOAT 8185 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 8186 ld.l_spec; 8187 #endif 8188 } 8189 8190 #ifdef CLOSURE_GLOSSY 8191 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 8192 out_spec *= F_area(f0, brdf_lut_lights.xy); 8193 #endif 8194 8195 #ifdef CLOSURE_CLEARCOAT 8196 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 8197 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 8198 out_spec += out_spec_clear * C_intensity; 8199 #endif 8200 8201 /* ---------------------------------------------------------------- */ 8202 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 8203 /* ---------------------------------------------------------------- */ 8204 8205 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 8206 #ifdef CLOSURE_GLOSSY 8207 vec4 spec_accum = vec4(0.0); 8208 #endif 8209 8210 #ifdef CLOSURE_CLEARCOAT 8211 vec4 C_spec_accum = vec4(0.0); 8212 #endif 8213 8214 #ifdef CLOSURE_REFRACTION 8215 vec4 refr_accum = vec4(0.0); 8216 #endif 8217 8218 #ifdef CLOSURE_GLOSSY 8219 /* ---------------------------- */ 8220 /* Planar Reflections */ 8221 /* ---------------------------- */ 8222 8223 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 8224 PlanarData pd = planars_data[i]; 8225 8226 /* Fade on geometric normal. */ 8227 float fade = probe_attenuation_planar( 8228 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 8229 8230 if (fade > 0.0) { 8231 if (!(ssrToggle && ssr_id == outputSsrId)) { 8232 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 8233 accumulate_light(spec, fade, spec_accum); 8234 } 8235 8236 #ifdef CLOSURE_CLEARCOAT 8237 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 8238 accumulate_light(C_spec, fade, C_spec_accum); 8239 #endif 8240 } 8241 } 8242 #endif 8243 8244 #ifdef CLOSURE_GLOSSY 8245 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 8246 #endif 8247 8248 #ifdef CLOSURE_CLEARCOAT 8249 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 8250 #endif 8251 8252 #ifdef CLOSURE_REFRACTION 8253 /* Refract the view vector using the depth heuristic. 8254 * Then later Refract a second time the already refracted 8255 * ray using the inverse ior. */ 8256 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 8257 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 8258 vec3 refr_pos = (refractionDepth > 0.0) ? 8259 line_plane_intersect( 8260 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 8261 worldPosition; 8262 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 8263 #endif 8264 8265 #ifdef CLOSURE_REFRACTION 8266 /* ---------------------------- */ 8267 /* Screen Space Refraction */ 8268 /* ---------------------------- */ 8269 #ifdef USE_REFRACTION 8270 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 8271 /* Find approximated position of the 2nd refraction event. */ 8272 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 8273 viewPosition; 8274 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 8275 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 8276 accumulate_light(trans.rgb, trans.a, refr_accum); 8277 } 8278 #endif 8279 8280 #endif 8281 8282 /* ---------------------------- */ 8283 /* Specular probes */ 8284 /* ---------------------------- */ 8285 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 8286 8287 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 8288 # define GLASS_ACCUM 1 8289 # define ACCUM min(refr_accum.a, spec_accum.a) 8290 #elif defined(CLOSURE_REFRACTION) 8291 # define GLASS_ACCUM 0 8292 # define ACCUM refr_accum.a 8293 #else 8294 # define GLASS_ACCUM 0 8295 # define ACCUM spec_accum.a 8296 #endif 8297 8298 /* Starts at 1 because 0 is world probe */ 8299 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 8300 float fade = probe_attenuation_cube(i, worldPosition); 8301 8302 if (fade > 0.0) { 8303 8304 #if GLASS_ACCUM 8305 if (spec_accum.a < 0.999) { 8306 #endif 8307 #ifdef CLOSURE_GLOSSY 8308 if (!(ssrToggle && ssr_id == outputSsrId)) { 8309 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 8310 accumulate_light(spec, fade, spec_accum); 8311 } 8312 #endif 8313 8314 #ifdef CLOSURE_CLEARCOAT 8315 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 8316 accumulate_light(C_spec, fade, C_spec_accum); 8317 #endif 8318 #if GLASS_ACCUM 8319 } 8320 #endif 8321 8322 #if GLASS_ACCUM 8323 if (refr_accum.a < 0.999) { 8324 #endif 8325 #ifdef CLOSURE_REFRACTION 8326 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 8327 accumulate_light(trans, fade, refr_accum); 8328 #endif 8329 #if GLASS_ACCUM 8330 } 8331 #endif 8332 } 8333 } 8334 8335 #undef GLASS_ACCUM 8336 #undef ACCUM 8337 8338 /* ---------------------------- */ 8339 /* World Probe */ 8340 /* ---------------------------- */ 8341 #ifdef CLOSURE_GLOSSY 8342 if (spec_accum.a < 0.999) { 8343 if (!(ssrToggle && ssr_id == outputSsrId)) { 8344 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 8345 accumulate_light(spec, 1.0, spec_accum); 8346 } 8347 8348 # ifdef CLOSURE_CLEARCOAT 8349 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 8350 accumulate_light(C_spec, 1.0, C_spec_accum); 8351 # endif 8352 } 8353 #endif 8354 8355 #ifdef CLOSURE_REFRACTION 8356 if (refr_accum.a < 0.999) { 8357 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 8358 accumulate_light(trans, 1.0, refr_accum); 8359 } 8360 #endif 8361 #endif /* Specular probes */ 8362 8363 /* ---------------------------- */ 8364 /* Ambient Occlusion */ 8365 /* ---------------------------- */ 8366 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 8367 vec3 bent_normal; 8368 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 8369 #endif 8370 8371 /* ---------------------------- */ 8372 /* Specular Output */ 8373 /* ---------------------------- */ 8374 float NV = dot(N, V); 8375 #ifdef CLOSURE_GLOSSY 8376 vec2 uv = lut_coords(NV, roughness); 8377 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 8378 8379 /* This factor is outputted to be used by SSR in order 8380 * to match the intensity of the regular reflections. */ 8381 ssr_spec = F_ibl(f0, brdf_lut); 8382 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 8383 8384 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 8385 if (ssrToggle && ssr_id == outputSsrId) { 8386 spec_occlu = 1.0; 8387 } 8388 8389 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 8390 #endif 8391 8392 #ifdef CLOSURE_REFRACTION 8393 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 8394 8395 out_refr += refr_accum.rgb * btdf; 8396 #endif 8397 8398 #ifdef CLOSURE_CLEARCOAT 8399 NV = dot(C_N, V); 8400 vec2 C_uv = lut_coords(NV, C_roughness); 8401 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 8402 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 8403 8404 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 8405 #endif 8406 8407 #ifdef CLOSURE_GLOSSY 8408 /* Global toggle for lightprobe baking. */ 8409 out_spec *= float(specToggle); 8410 #endif 8411 8412 /* ---------------------------------------------------------------- */ 8413 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 8414 /* ---------------------------------------------------------------- */ 8415 8416 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 8417 #ifdef CLOSURE_DIFFUSE 8418 vec4 diff_accum = vec4(0.0); 8419 8420 /* ---------------------------- */ 8421 /* Irradiance Grids */ 8422 /* ---------------------------- */ 8423 /* Start at 1 because 0 is world irradiance */ 8424 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 8425 GridData gd = grids_data[i]; 8426 8427 vec3 localpos; 8428 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 8429 8430 if (fade > 0.0) { 8431 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 8432 accumulate_light(diff, fade, diff_accum); 8433 } 8434 } 8435 8436 /* ---------------------------- */ 8437 /* World Diffuse */ 8438 /* ---------------------------- */ 8439 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 8440 vec3 diff = probe_evaluate_world_diff(bent_normal); 8441 accumulate_light(diff, 1.0, diff_accum); 8442 } 8443 8444 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 8445 #endif 8446 } 8447 8448 /* Cleanup for next configuration */ 8449 #undef CLOSURE_NAME 8450 8451 #ifdef CLOSURE_DIFFUSE 8452 #undef CLOSURE_DIFFUSE 8453 #endif 8454 8455 #ifdef CLOSURE_GLOSSY 8456 #undef CLOSURE_GLOSSY 8457 #endif 8458 8459 #ifdef CLOSURE_CLEARCOAT 8460 #undef CLOSURE_CLEARCOAT 8461 #endif 8462 8463 #ifdef CLOSURE_REFRACTION 8464 #undef CLOSURE_REFRACTION 8465 #endif 8466 8467 #ifdef CLOSURE_SUBSURFACE 8468 #undef CLOSURE_SUBSURFACE 8469 #endif 8470 8471 /* Based on Frosbite Unified Volumetric. 8472 * https://www.ea.com/frostbite/news/physically-based-unified-volumetric-rendering-in-frostbite */ 8473 8474 /* Volume slice to view space depth. */ 8475 float volume_z_to_view_z(float z) 8476 { 8477 if (ProjectionMatrix[3][3] == 0.0) { 8478 /* Exponential distribution */ 8479 return (exp2(z / volDepthParameters.z) - volDepthParameters.x) / volDepthParameters.y; 8480 } 8481 else { 8482 /* Linear distribution */ 8483 return mix(volDepthParameters.x, volDepthParameters.y, z); 8484 } 8485 } 8486 8487 float view_z_to_volume_z(float depth) 8488 { 8489 if (ProjectionMatrix[3][3] == 0.0) { 8490 /* Exponential distribution */ 8491 return volDepthParameters.z * log2(depth * volDepthParameters.y + volDepthParameters.x); 8492 } 8493 else { 8494 /* Linear distribution */ 8495 return (depth - volDepthParameters.x) * volDepthParameters.z; 8496 } 8497 } 8498 8499 /* Volume texture normalized coordinates to NDC (special range [0, 1]). */ 8500 vec3 volume_to_ndc(vec3 cos) 8501 { 8502 cos.z = volume_z_to_view_z(cos.z); 8503 cos.z = get_depth_from_view_z(cos.z); 8504 cos.xy /= volCoordScale.xy; 8505 return cos; 8506 } 8507 8508 vec3 ndc_to_volume(vec3 cos) 8509 { 8510 cos.z = get_view_z_from_depth(cos.z); 8511 cos.z = view_z_to_volume_z(cos.z); 8512 cos.xy *= volCoordScale.xy; 8513 return cos; 8514 } 8515 8516 float phase_function_isotropic() 8517 { 8518 return 1.0 / (4.0 * M_PI); 8519 } 8520 8521 float phase_function(vec3 v, vec3 l, float g) 8522 { 8523 /* Henyey-Greenstein */ 8524 float cos_theta = dot(v, l); 8525 g = clamp(g, -1.0 + 1e-3, 1.0 - 1e-3); 8526 float sqr_g = g * g; 8527 return (1 - sqr_g) / max(1e-8, 4.0 * M_PI * pow(1 + sqr_g - 2 * g * cos_theta, 3.0 / 2.0)); 8528 } 8529 8530 #ifdef LAMPS_LIB 8531 vec3 light_volume(LightData ld, vec4 l_vector) 8532 { 8533 float power; 8534 /* TODO : Area lighting ? */ 8535 /* XXX : Removing Area Power. */ 8536 /* TODO : put this out of the shader. */ 8537 /* See eevee_light_setup(). */ 8538 if (ld.l_type == AREA_RECT || ld.l_type == AREA_ELLIPSE) { 8539 power = (ld.l_sizex * ld.l_sizey * 4.0 * M_PI) * (1.0 / 80.0); 8540 if (ld.l_type == AREA_ELLIPSE) { 8541 power *= M_PI * 0.25; 8542 } 8543 power *= 20.0 * 8544 max(0.0, dot(-ld.l_forward, l_vector.xyz / l_vector.w)); /* XXX ad hoc, empirical */ 8545 } 8546 else if (ld.l_type == SUN) { 8547 power = ld.l_radius * ld.l_radius * M_PI; /* Removing area light power*/ 8548 power /= 1.0f + (ld.l_radius * ld.l_radius * 0.5f); 8549 power *= M_PI * 0.5; /* Matching cycles. */ 8550 } 8551 else { 8552 power = (4.0 * ld.l_radius * ld.l_radius) * (1.0 / 10.0); 8553 power *= M_2PI; /* Matching cycles with point light. */ 8554 } 8555 8556 power /= (l_vector.w * l_vector.w); 8557 8558 /* OPTI: find a better way than calculating this on the fly */ 8559 float lum = dot(ld.l_color, vec3(0.3, 0.6, 0.1)); /* luminance approx. */ 8560 vec3 tint = (lum > 0.0) ? ld.l_color / lum : vec3(1.0); /* normalize lum. to isolate hue+sat */ 8561 8562 lum = min(lum * power, volLightClamp); 8563 8564 return tint * lum; 8565 } 8566 8567 # define VOLUMETRIC_SHADOW_MAX_STEP 32.0 8568 8569 vec3 participating_media_extinction(vec3 wpos, sampler3D volume_extinction) 8570 { 8571 /* Waiting for proper volume shadowmaps and out of frustum shadow map. */ 8572 vec3 ndc = project_point(ViewProjectionMatrix, wpos); 8573 vec3 volume_co = ndc_to_volume(ndc * 0.5 + 0.5); 8574 8575 /* Let the texture be clamped to edge. This reduce visual glitches. */ 8576 return texture(volume_extinction, volume_co).rgb; 8577 } 8578 8579 vec3 light_volume_shadow(LightData ld, vec3 ray_wpos, vec4 l_vector, sampler3D volume_extinction) 8580 { 8581 # if defined(VOLUME_SHADOW) 8582 /* Heterogeneous volume shadows */ 8583 float dd = l_vector.w / volShadowSteps; 8584 vec3 L = l_vector.xyz * l_vector.w; 8585 vec3 shadow = vec3(1.0); 8586 for (float s = 0.5; s < VOLUMETRIC_SHADOW_MAX_STEP && s < (volShadowSteps - 0.1); s += 1.0) { 8587 vec3 pos = ray_wpos + L * (s / volShadowSteps); 8588 vec3 s_extinction = participating_media_extinction(pos, volume_extinction); 8589 shadow *= exp(-s_extinction * dd); 8590 } 8591 return shadow; 8592 # else 8593 return vec3(1.0); 8594 # endif /* VOLUME_SHADOW */ 8595 } 8596 #endif 8597 8598 #ifdef IRRADIANCE_LIB 8599 vec3 irradiance_volumetric(vec3 wpos) 8600 { 8601 # ifdef IRRADIANCE_HL2 8602 IrradianceData ir_data = load_irradiance_cell(0, vec3(1.0)); 8603 vec3 irradiance = ir_data.cubesides[0] + ir_data.cubesides[1] + ir_data.cubesides[2]; 8604 ir_data = load_irradiance_cell(0, vec3(-1.0)); 8605 irradiance += ir_data.cubesides[0] + ir_data.cubesides[1] + ir_data.cubesides[2]; 8606 irradiance *= 0.16666666; /* 1/6 */ 8607 return irradiance; 8608 # else 8609 return vec3(0.0); 8610 # endif 8611 } 8612 #endif 8613 8614 uniform sampler3D inScattering; 8615 uniform sampler3D inTransmittance; 8616 8617 vec4 volumetric_resolve(vec4 scene_color, vec2 frag_uvs, float frag_depth) 8618 { 8619 vec3 volume_cos = ndc_to_volume(vec3(frag_uvs, frag_depth)); 8620 8621 vec3 scattering = texture(inScattering, volume_cos).rgb; 8622 vec3 transmittance = texture(inTransmittance, volume_cos).rgb; 8623 8624 /* Approximate volume alpha by using a monochromatic transmitance 8625 * and adding it to the scene alpha. */ 8626 float final_alpha = mix(1.0, scene_color.a, dot(transmittance, vec3(1.0 / 3.0))); 8627 return vec4(scene_color.rgb * transmittance + scattering, final_alpha); 8628 } 8629 8630 uniform mat4 ModelViewMatrix; 8631 uniform mat4 ModelViewMatrixInverse; 8632 uniform mat3 NormalMatrix; 8633 uniform mat3 NormalMatrixInverse; 8634 8635 #ifndef USE_ATTR 8636 uniform mat4 ModelMatrix; 8637 uniform mat4 ModelMatrixInverse; 8638 #endif 8639 8640 /* Converters */ 8641 8642 float convert_rgba_to_float(vec4 color) 8643 { 8644 return dot(color.rgb, vec3(0.2126, 0.7152, 0.0722)); 8645 } 8646 8647 float exp_blender(float f) 8648 { 8649 return pow(2.71828182846, f); 8650 } 8651 8652 float compatible_pow(float x, float y) 8653 { 8654 if (y == 0.0) /* x^0 -> 1, including 0^0 */ 8655 return 1.0; 8656 8657 /* glsl pow doesn't accept negative x */ 8658 if (x < 0.0) { 8659 if (mod(-y, 2.0) == 0.0) 8660 return pow(-x, y); 8661 else 8662 return -pow(-x, y); 8663 } 8664 else if (x == 0.0) 8665 return 0.0; 8666 8667 return pow(x, y); 8668 } 8669 8670 void rgb_to_hsv(vec4 rgb, out vec4 outcol) 8671 { 8672 float cmax, cmin, h, s, v, cdelta; 8673 vec3 c; 8674 8675 cmax = max(rgb[0], max(rgb[1], rgb[2])); 8676 cmin = min(rgb[0], min(rgb[1], rgb[2])); 8677 cdelta = cmax - cmin; 8678 8679 v = cmax; 8680 if (cmax != 0.0) 8681 s = cdelta / cmax; 8682 else { 8683 s = 0.0; 8684 h = 0.0; 8685 } 8686 8687 if (s == 0.0) { 8688 h = 0.0; 8689 } 8690 else { 8691 c = (vec3(cmax) - rgb.xyz) / cdelta; 8692 8693 if (rgb.x == cmax) 8694 h = c[2] - c[1]; 8695 else if (rgb.y == cmax) 8696 h = 2.0 + c[0] - c[2]; 8697 else 8698 h = 4.0 + c[1] - c[0]; 8699 8700 h /= 6.0; 8701 8702 if (h < 0.0) 8703 h += 1.0; 8704 } 8705 8706 outcol = vec4(h, s, v, rgb.w); 8707 } 8708 8709 void hsv_to_rgb(vec4 hsv, out vec4 outcol) 8710 { 8711 float i, f, p, q, t, h, s, v; 8712 vec3 rgb; 8713 8714 h = hsv[0]; 8715 s = hsv[1]; 8716 v = hsv[2]; 8717 8718 if (s == 0.0) { 8719 rgb = vec3(v, v, v); 8720 } 8721 else { 8722 if (h == 1.0) 8723 h = 0.0; 8724 8725 h *= 6.0; 8726 i = floor(h); 8727 f = h - i; 8728 rgb = vec3(f, f, f); 8729 p = v * (1.0 - s); 8730 q = v * (1.0 - (s * f)); 8731 t = v * (1.0 - (s * (1.0 - f))); 8732 8733 if (i == 0.0) 8734 rgb = vec3(v, t, p); 8735 else if (i == 1.0) 8736 rgb = vec3(q, v, p); 8737 else if (i == 2.0) 8738 rgb = vec3(p, v, t); 8739 else if (i == 3.0) 8740 rgb = vec3(p, q, v); 8741 else if (i == 4.0) 8742 rgb = vec3(t, p, v); 8743 else 8744 rgb = vec3(v, p, q); 8745 } 8746 8747 outcol = vec4(rgb, hsv.w); 8748 } 8749 8750 float srgb_to_linearrgb(float c) 8751 { 8752 if (c < 0.04045) 8753 return (c < 0.0) ? 0.0 : c * (1.0 / 12.92); 8754 else 8755 return pow((c + 0.055) * (1.0 / 1.055), 2.4); 8756 } 8757 8758 float linearrgb_to_srgb(float c) 8759 { 8760 if (c < 0.0031308) 8761 return (c < 0.0) ? 0.0 : c * 12.92; 8762 else 8763 return 1.055 * pow(c, 1.0 / 2.4) - 0.055; 8764 } 8765 8766 void srgb_to_linearrgb(vec4 col_from, out vec4 col_to) 8767 { 8768 col_to.r = srgb_to_linearrgb(col_from.r); 8769 col_to.g = srgb_to_linearrgb(col_from.g); 8770 col_to.b = srgb_to_linearrgb(col_from.b); 8771 col_to.a = col_from.a; 8772 } 8773 8774 void linearrgb_to_srgb(vec4 col_from, out vec4 col_to) 8775 { 8776 col_to.r = linearrgb_to_srgb(col_from.r); 8777 col_to.g = linearrgb_to_srgb(col_from.g); 8778 col_to.b = linearrgb_to_srgb(col_from.b); 8779 col_to.a = col_from.a; 8780 } 8781 8782 void color_to_normal_new_shading(vec3 color, out vec3 normal) 8783 { 8784 normal = vec3(2.0) * color - vec3(1.0); 8785 } 8786 8787 void color_to_blender_normal_new_shading(vec3 color, out vec3 normal) 8788 { 8789 normal = vec3(2.0, -2.0, -2.0) * color - vec3(1.0); 8790 } 8791 8792 #ifndef M_PI 8793 # define M_PI 3.14159265358979323846 8794 #endif 8795 #ifndef M_1_PI 8796 # define M_1_PI 0.318309886183790671538 8797 #endif 8798 8799 /*********** SHADER NODES ***************/ 8800 8801 void particle_info(vec4 sprops, 8802 vec4 loc, 8803 vec3 vel, 8804 vec3 avel, 8805 out float index, 8806 out float random, 8807 out float age, 8808 out float life_time, 8809 out vec3 location, 8810 out float size, 8811 out vec3 velocity, 8812 out vec3 angular_velocity) 8813 { 8814 index = sprops.x; 8815 random = loc.w; 8816 age = sprops.y; 8817 life_time = sprops.z; 8818 size = sprops.w; 8819 8820 location = loc.xyz; 8821 velocity = vel; 8822 angular_velocity = avel; 8823 } 8824 8825 void vect_normalize(vec3 vin, out vec3 vout) 8826 { 8827 vout = normalize(vin); 8828 } 8829 8830 void direction_transform_m4v3(vec3 vin, mat4 mat, out vec3 vout) 8831 { 8832 vout = (mat * vec4(vin, 0.0)).xyz; 8833 } 8834 8835 void mat3_mul(vec3 vin, mat3 mat, out vec3 vout) 8836 { 8837 vout = mat * vin; 8838 } 8839 8840 void point_transform_m4v3(vec3 vin, mat4 mat, out vec3 vout) 8841 { 8842 vout = (mat * vec4(vin, 1.0)).xyz; 8843 } 8844 8845 void point_texco_remap_square(vec3 vin, out vec3 vout) 8846 { 8847 vout = vin * 2.0 - 1.0; 8848 } 8849 8850 void point_texco_clamp(vec3 vin, sampler2D ima, out vec3 vout) 8851 { 8852 vec2 half_texel_size = 0.5 / vec2(textureSize(ima, 0).xy); 8853 vout = clamp(vin, half_texel_size.xyy, 1.0 - half_texel_size.xyy); 8854 } 8855 8856 void point_map_to_sphere(vec3 vin, out vec3 vout) 8857 { 8858 float len = length(vin); 8859 float v, u; 8860 if (len > 0.0) { 8861 if (vin.x == 0.0 && vin.y == 0.0) 8862 u = 0.0; 8863 else 8864 u = (1.0 - atan(vin.x, vin.y) / M_PI) / 2.0; 8865 8866 v = 1.0 - acos(vin.z / len) / M_PI; 8867 } 8868 else 8869 v = u = 0.0; 8870 8871 vout = vec3(u, v, 0.0); 8872 } 8873 8874 void point_map_to_tube(vec3 vin, out vec3 vout) 8875 { 8876 float u, v; 8877 v = (vin.z + 1.0) * 0.5; 8878 float len = sqrt(vin.x * vin.x + vin.y * vin[1]); 8879 if (len > 0.0) 8880 u = (1.0 - (atan(vin.x / len, vin.y / len) / M_PI)) * 0.5; 8881 else 8882 v = u = 0.0; 8883 8884 vout = vec3(u, v, 0.0); 8885 } 8886 8887 void mapping( 8888 vec3 vec, vec4 m0, vec4 m1, vec4 m2, vec4 m3, vec3 minvec, vec3 maxvec, out vec3 outvec) 8889 { 8890 mat4 mat = mat4(m0, m1, m2, m3); 8891 outvec = (mat * vec4(vec, 1.0)).xyz; 8892 outvec = clamp(outvec, minvec, maxvec); 8893 } 8894 8895 void camera(vec3 co, out vec3 outview, out float outdepth, out float outdist) 8896 { 8897 outdepth = abs(co.z); 8898 outdist = length(co); 8899 outview = normalize(co); 8900 } 8901 8902 void math_add(float val1, float val2, out float outval) 8903 { 8904 outval = val1 + val2; 8905 } 8906 8907 void math_subtract(float val1, float val2, out float outval) 8908 { 8909 outval = val1 - val2; 8910 } 8911 8912 void math_multiply(float val1, float val2, out float outval) 8913 { 8914 outval = val1 * val2; 8915 } 8916 8917 void math_divide(float val1, float val2, out float outval) 8918 { 8919 if (val2 == 0.0) 8920 outval = 0.0; 8921 else 8922 outval = val1 / val2; 8923 } 8924 8925 void math_sine(float val, out float outval) 8926 { 8927 outval = sin(val); 8928 } 8929 8930 void math_cosine(float val, out float outval) 8931 { 8932 outval = cos(val); 8933 } 8934 8935 void math_tangent(float val, out float outval) 8936 { 8937 outval = tan(val); 8938 } 8939 8940 void math_asin(float val, out float outval) 8941 { 8942 if (val <= 1.0 && val >= -1.0) 8943 outval = asin(val); 8944 else 8945 outval = 0.0; 8946 } 8947 8948 void math_acos(float val, out float outval) 8949 { 8950 if (val <= 1.0 && val >= -1.0) 8951 outval = acos(val); 8952 else 8953 outval = 0.0; 8954 } 8955 8956 void math_atan(float val, out float outval) 8957 { 8958 outval = atan(val); 8959 } 8960 8961 void math_pow(float val1, float val2, out float outval) 8962 { 8963 if (val1 >= 0.0) { 8964 outval = compatible_pow(val1, val2); 8965 } 8966 else { 8967 float val2_mod_1 = mod(abs(val2), 1.0); 8968 8969 if (val2_mod_1 > 0.999 || val2_mod_1 < 0.001) 8970 outval = compatible_pow(val1, floor(val2 + 0.5)); 8971 else 8972 outval = 0.0; 8973 } 8974 } 8975 8976 void math_log(float val1, float val2, out float outval) 8977 { 8978 if (val1 > 0.0 && val2 > 0.0) 8979 outval = log2(val1) / log2(val2); 8980 else 8981 outval = 0.0; 8982 } 8983 8984 void math_max(float val1, float val2, out float outval) 8985 { 8986 outval = max(val1, val2); 8987 } 8988 8989 void math_min(float val1, float val2, out float outval) 8990 { 8991 outval = min(val1, val2); 8992 } 8993 8994 void math_round(float val, out float outval) 8995 { 8996 outval = floor(val + 0.5); 8997 } 8998 8999 void math_less_than(float val1, float val2, out float outval) 9000 { 9001 if (val1 < val2) 9002 outval = 1.0; 9003 else 9004 outval = 0.0; 9005 } 9006 9007 void math_greater_than(float val1, float val2, out float outval) 9008 { 9009 if (val1 > val2) 9010 outval = 1.0; 9011 else 9012 outval = 0.0; 9013 } 9014 9015 void math_modulo(float val1, float val2, out float outval) 9016 { 9017 if (val2 == 0.0) 9018 outval = 0.0; 9019 else 9020 outval = mod(val1, val2); 9021 9022 /* change sign to match C convention, mod in GLSL will take absolute for negative numbers, 9023 * see https://www.opengl.org/sdk/docs/man/html/mod.xhtml */ 9024 outval = (val1 > 0.0) ? outval : outval - val2; 9025 } 9026 9027 void math_abs(float val1, out float outval) 9028 { 9029 outval = abs(val1); 9030 } 9031 9032 void math_atan2(float val1, float val2, out float outval) 9033 { 9034 outval = atan(val1, val2); 9035 } 9036 9037 void math_floor(float val, out float outval) 9038 { 9039 outval = floor(val); 9040 } 9041 9042 void math_ceil(float val, out float outval) 9043 { 9044 outval = ceil(val); 9045 } 9046 9047 void math_fract(float val, out float outval) 9048 { 9049 outval = val - floor(val); 9050 } 9051 9052 void math_sqrt(float val, out float outval) 9053 { 9054 if (val > 0.0) 9055 outval = sqrt(val); 9056 else 9057 outval = 0.0; 9058 } 9059 9060 void squeeze(float val, float width, float center, out float outval) 9061 { 9062 outval = 1.0 / (1.0 + pow(2.71828183, -((val - center) * width))); 9063 } 9064 9065 void vec_math_add(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9066 { 9067 outvec = v1 + v2; 9068 outval = (abs(outvec[0]) + abs(outvec[1]) + abs(outvec[2])) * 0.333333; 9069 } 9070 9071 void vec_math_sub(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9072 { 9073 outvec = v1 - v2; 9074 outval = (abs(outvec[0]) + abs(outvec[1]) + abs(outvec[2])) * 0.333333; 9075 } 9076 9077 void vec_math_average(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9078 { 9079 outvec = v1 + v2; 9080 outval = length(outvec); 9081 outvec = normalize(outvec); 9082 } 9083 void vec_math_mix(float strength, vec3 v1, vec3 v2, out vec3 outvec) 9084 { 9085 outvec = strength * v1 + (1 - strength) * v2; 9086 } 9087 9088 void vec_math_dot(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9089 { 9090 outvec = vec3(0); 9091 outval = dot(v1, v2); 9092 } 9093 9094 void vec_math_cross(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9095 { 9096 outvec = cross(v1, v2); 9097 outval = length(outvec); 9098 outvec /= outval; 9099 } 9100 9101 void vec_math_normalize(vec3 v, out vec3 outvec, out float outval) 9102 { 9103 outval = length(v); 9104 outvec = normalize(v); 9105 } 9106 9107 void vec_math_negate(vec3 v, out vec3 outv) 9108 { 9109 outv = -v; 9110 } 9111 9112 void invert_z(vec3 v, out vec3 outv) 9113 { 9114 v.z = -v.z; 9115 outv = v; 9116 } 9117 9118 void normal_new_shading(vec3 nor, vec3 dir, out vec3 outnor, out float outdot) 9119 { 9120 outnor = dir; 9121 outdot = dot(normalize(nor), dir); 9122 } 9123 9124 void curves_vec(float fac, vec3 vec, sampler1DArray curvemap, float layer, out vec3 outvec) 9125 { 9126 vec4 co = vec4(vec * 0.5 + 0.5, layer); 9127 outvec.x = texture(curvemap, co.xw).x; 9128 outvec.y = texture(curvemap, co.yw).y; 9129 outvec.z = texture(curvemap, co.zw).z; 9130 outvec = mix(vec, outvec, fac); 9131 } 9132 9133 /* ext is vec4(in_x, in_dy, out_x, out_dy). */ 9134 float curve_extrapolate(float x, float y, vec4 ext) 9135 { 9136 if (x < 0.0) { 9137 return y + x * ext.y; 9138 } 9139 else if (x > 1.0) { 9140 return y + (x - 1.0) * ext.w; 9141 } 9142 else { 9143 return y; 9144 } 9145 } 9146 9147 #define RANGE_RESCALE(x, min, range) ((x - min) * range) 9148 9149 void curves_rgb(float fac, 9150 vec4 col, 9151 sampler1DArray curvemap, 9152 float layer, 9153 vec4 range, 9154 vec4 ext_r, 9155 vec4 ext_g, 9156 vec4 ext_b, 9157 vec4 ext_a, 9158 out vec4 outcol) 9159 { 9160 vec4 co = vec4(RANGE_RESCALE(col.rgb, ext_a.x, range.a), layer); 9161 vec3 samp; 9162 samp.r = texture(curvemap, co.xw).a; 9163 samp.g = texture(curvemap, co.yw).a; 9164 samp.b = texture(curvemap, co.zw).a; 9165 9166 samp.r = curve_extrapolate(co.x, samp.r, ext_a); 9167 samp.g = curve_extrapolate(co.y, samp.g, ext_a); 9168 samp.b = curve_extrapolate(co.z, samp.b, ext_a); 9169 9170 vec3 rgb_min = vec3(ext_r.x, ext_g.x, ext_b.x); 9171 co.xyz = RANGE_RESCALE(samp.rgb, rgb_min, range.rgb); 9172 9173 samp.r = texture(curvemap, co.xw).r; 9174 samp.g = texture(curvemap, co.yw).g; 9175 samp.b = texture(curvemap, co.zw).b; 9176 9177 outcol.r = curve_extrapolate(co.x, samp.r, ext_r); 9178 outcol.g = curve_extrapolate(co.y, samp.g, ext_g); 9179 outcol.b = curve_extrapolate(co.z, samp.b, ext_b); 9180 outcol.a = col.a; 9181 9182 outcol = mix(col, outcol, fac); 9183 } 9184 9185 void curves_rgb_opti(float fac, 9186 vec4 col, 9187 sampler1DArray curvemap, 9188 float layer, 9189 vec4 range, 9190 vec4 ext_a, 9191 out vec4 outcol) 9192 { 9193 vec4 co = vec4(RANGE_RESCALE(col.rgb, ext_a.x, range.a), layer); 9194 vec3 samp; 9195 samp.r = texture(curvemap, co.xw).a; 9196 samp.g = texture(curvemap, co.yw).a; 9197 samp.b = texture(curvemap, co.zw).a; 9198 9199 outcol.r = curve_extrapolate(co.x, samp.r, ext_a); 9200 outcol.g = curve_extrapolate(co.y, samp.g, ext_a); 9201 outcol.b = curve_extrapolate(co.z, samp.b, ext_a); 9202 outcol.a = col.a; 9203 9204 outcol = mix(col, outcol, fac); 9205 } 9206 9207 void set_value(float val, out float outval) 9208 { 9209 outval = val; 9210 } 9211 9212 void set_rgb(vec3 col, out vec3 outcol) 9213 { 9214 outcol = col; 9215 } 9216 9217 void set_rgba(vec4 col, out vec4 outcol) 9218 { 9219 outcol = col; 9220 } 9221 9222 void set_value_zero(out float outval) 9223 { 9224 outval = 0.0; 9225 } 9226 9227 void set_value_one(out float outval) 9228 { 9229 outval = 1.0; 9230 } 9231 9232 void set_rgb_zero(out vec3 outval) 9233 { 9234 outval = vec3(0.0); 9235 } 9236 9237 void set_rgb_one(out vec3 outval) 9238 { 9239 outval = vec3(1.0); 9240 } 9241 9242 void set_rgba_zero(out vec4 outval) 9243 { 9244 outval = vec4(0.0); 9245 } 9246 9247 void set_rgba_one(out vec4 outval) 9248 { 9249 outval = vec4(1.0); 9250 } 9251 9252 void brightness_contrast(vec4 col, float brightness, float contrast, out vec4 outcol) 9253 { 9254 float a = 1.0 + contrast; 9255 float b = brightness - contrast * 0.5; 9256 9257 outcol.r = max(a * col.r + b, 0.0); 9258 outcol.g = max(a * col.g + b, 0.0); 9259 outcol.b = max(a * col.b + b, 0.0); 9260 outcol.a = col.a; 9261 } 9262 9263 void mix_blend(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9264 { 9265 fac = clamp(fac, 0.0, 1.0); 9266 outcol = mix(col1, col2, fac); 9267 outcol.a = col1.a; 9268 } 9269 9270 void mix_add(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9271 { 9272 fac = clamp(fac, 0.0, 1.0); 9273 outcol = mix(col1, col1 + col2, fac); 9274 outcol.a = col1.a; 9275 } 9276 9277 void mix_mult(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9278 { 9279 fac = clamp(fac, 0.0, 1.0); 9280 outcol = mix(col1, col1 * col2, fac); 9281 outcol.a = col1.a; 9282 } 9283 9284 void mix_screen(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9285 { 9286 fac = clamp(fac, 0.0, 1.0); 9287 float facm = 1.0 - fac; 9288 9289 outcol = vec4(1.0) - (vec4(facm) + fac * (vec4(1.0) - col2)) * (vec4(1.0) - col1); 9290 outcol.a = col1.a; 9291 } 9292 9293 void mix_overlay(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9294 { 9295 fac = clamp(fac, 0.0, 1.0); 9296 float facm = 1.0 - fac; 9297 9298 outcol = col1; 9299 9300 if (outcol.r < 0.5) 9301 outcol.r *= facm + 2.0 * fac * col2.r; 9302 else 9303 outcol.r = 1.0 - (facm + 2.0 * fac * (1.0 - col2.r)) * (1.0 - outcol.r); 9304 9305 if (outcol.g < 0.5) 9306 outcol.g *= facm + 2.0 * fac * col2.g; 9307 else 9308 outcol.g = 1.0 - (facm + 2.0 * fac * (1.0 - col2.g)) * (1.0 - outcol.g); 9309 9310 if (outcol.b < 0.5) 9311 outcol.b *= facm + 2.0 * fac * col2.b; 9312 else 9313 outcol.b = 1.0 - (facm + 2.0 * fac * (1.0 - col2.b)) * (1.0 - outcol.b); 9314 } 9315 9316 void mix_sub(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9317 { 9318 fac = clamp(fac, 0.0, 1.0); 9319 outcol = mix(col1, col1 - col2, fac); 9320 outcol.a = col1.a; 9321 } 9322 9323 void mix_div(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9324 { 9325 fac = clamp(fac, 0.0, 1.0); 9326 float facm = 1.0 - fac; 9327 9328 outcol = col1; 9329 9330 if (col2.r != 0.0) 9331 outcol.r = facm * outcol.r + fac * outcol.r / col2.r; 9332 if (col2.g != 0.0) 9333 outcol.g = facm * outcol.g + fac * outcol.g / col2.g; 9334 if (col2.b != 0.0) 9335 outcol.b = facm * outcol.b + fac * outcol.b / col2.b; 9336 } 9337 9338 void mix_diff(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9339 { 9340 fac = clamp(fac, 0.0, 1.0); 9341 outcol = mix(col1, abs(col1 - col2), fac); 9342 outcol.a = col1.a; 9343 } 9344 9345 void mix_dark(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9346 { 9347 fac = clamp(fac, 0.0, 1.0); 9348 outcol.rgb = min(col1.rgb, col2.rgb * fac); 9349 outcol.a = col1.a; 9350 } 9351 9352 void mix_light(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9353 { 9354 fac = clamp(fac, 0.0, 1.0); 9355 outcol.rgb = max(col1.rgb, col2.rgb * fac); 9356 outcol.a = col1.a; 9357 } 9358 9359 void mix_dodge(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9360 { 9361 fac = clamp(fac, 0.0, 1.0); 9362 outcol = col1; 9363 9364 if (outcol.r != 0.0) { 9365 float tmp = 1.0 - fac * col2.r; 9366 if (tmp <= 0.0) 9367 outcol.r = 1.0; 9368 else if ((tmp = outcol.r / tmp) > 1.0) 9369 outcol.r = 1.0; 9370 else 9371 outcol.r = tmp; 9372 } 9373 if (outcol.g != 0.0) { 9374 float tmp = 1.0 - fac * col2.g; 9375 if (tmp <= 0.0) 9376 outcol.g = 1.0; 9377 else if ((tmp = outcol.g / tmp) > 1.0) 9378 outcol.g = 1.0; 9379 else 9380 outcol.g = tmp; 9381 } 9382 if (outcol.b != 0.0) { 9383 float tmp = 1.0 - fac * col2.b; 9384 if (tmp <= 0.0) 9385 outcol.b = 1.0; 9386 else if ((tmp = outcol.b / tmp) > 1.0) 9387 outcol.b = 1.0; 9388 else 9389 outcol.b = tmp; 9390 } 9391 } 9392 9393 void mix_burn(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9394 { 9395 fac = clamp(fac, 0.0, 1.0); 9396 float tmp, facm = 1.0 - fac; 9397 9398 outcol = col1; 9399 9400 tmp = facm + fac * col2.r; 9401 if (tmp <= 0.0) 9402 outcol.r = 0.0; 9403 else if ((tmp = (1.0 - (1.0 - outcol.r) / tmp)) < 0.0) 9404 outcol.r = 0.0; 9405 else if (tmp > 1.0) 9406 outcol.r = 1.0; 9407 else 9408 outcol.r = tmp; 9409 9410 tmp = facm + fac * col2.g; 9411 if (tmp <= 0.0) 9412 outcol.g = 0.0; 9413 else if ((tmp = (1.0 - (1.0 - outcol.g) / tmp)) < 0.0) 9414 outcol.g = 0.0; 9415 else if (tmp > 1.0) 9416 outcol.g = 1.0; 9417 else 9418 outcol.g = tmp; 9419 9420 tmp = facm + fac * col2.b; 9421 if (tmp <= 0.0) 9422 outcol.b = 0.0; 9423 else if ((tmp = (1.0 - (1.0 - outcol.b) / tmp)) < 0.0) 9424 outcol.b = 0.0; 9425 else if (tmp > 1.0) 9426 outcol.b = 1.0; 9427 else 9428 outcol.b = tmp; 9429 } 9430 9431 void mix_hue(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9432 { 9433 fac = clamp(fac, 0.0, 1.0); 9434 float facm = 1.0 - fac; 9435 9436 outcol = col1; 9437 9438 vec4 hsv, hsv2, tmp; 9439 rgb_to_hsv(col2, hsv2); 9440 9441 if (hsv2.y != 0.0) { 9442 rgb_to_hsv(outcol, hsv); 9443 hsv.x = hsv2.x; 9444 hsv_to_rgb(hsv, tmp); 9445 9446 outcol = mix(outcol, tmp, fac); 9447 outcol.a = col1.a; 9448 } 9449 } 9450 9451 void mix_sat(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9452 { 9453 fac = clamp(fac, 0.0, 1.0); 9454 float facm = 1.0 - fac; 9455 9456 outcol = col1; 9457 9458 vec4 hsv, hsv2; 9459 rgb_to_hsv(outcol, hsv); 9460 9461 if (hsv.y != 0.0) { 9462 rgb_to_hsv(col2, hsv2); 9463 9464 hsv.y = facm * hsv.y + fac * hsv2.y; 9465 hsv_to_rgb(hsv, outcol); 9466 } 9467 } 9468 9469 void mix_val(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9470 { 9471 fac = clamp(fac, 0.0, 1.0); 9472 float facm = 1.0 - fac; 9473 9474 vec4 hsv, hsv2; 9475 rgb_to_hsv(col1, hsv); 9476 rgb_to_hsv(col2, hsv2); 9477 9478 hsv.z = facm * hsv.z + fac * hsv2.z; 9479 hsv_to_rgb(hsv, outcol); 9480 } 9481 9482 void mix_color(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9483 { 9484 fac = clamp(fac, 0.0, 1.0); 9485 float facm = 1.0 - fac; 9486 9487 outcol = col1; 9488 9489 vec4 hsv, hsv2, tmp; 9490 rgb_to_hsv(col2, hsv2); 9491 9492 if (hsv2.y != 0.0) { 9493 rgb_to_hsv(outcol, hsv); 9494 hsv.x = hsv2.x; 9495 hsv.y = hsv2.y; 9496 hsv_to_rgb(hsv, tmp); 9497 9498 outcol = mix(outcol, tmp, fac); 9499 outcol.a = col1.a; 9500 } 9501 } 9502 9503 void mix_soft(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9504 { 9505 fac = clamp(fac, 0.0, 1.0); 9506 float facm = 1.0 - fac; 9507 9508 vec4 one = vec4(1.0); 9509 vec4 scr = one - (one - col2) * (one - col1); 9510 outcol = facm * col1 + fac * ((one - col1) * col2 * col1 + col1 * scr); 9511 } 9512 9513 void mix_linear(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9514 { 9515 fac = clamp(fac, 0.0, 1.0); 9516 9517 outcol = col1 + fac * (2.0 * (col2 - vec4(0.5))); 9518 } 9519 9520 void valtorgb_opti_constant( 9521 float fac, float edge, vec4 color1, vec4 color2, out vec4 outcol, out float outalpha) 9522 { 9523 outcol = (fac > edge) ? color2 : color1; 9524 outalpha = outcol.a; 9525 } 9526 9527 void valtorgb_opti_linear( 9528 float fac, vec2 mulbias, vec4 color1, vec4 color2, out vec4 outcol, out float outalpha) 9529 { 9530 fac = clamp(fac * mulbias.x + mulbias.y, 0.0, 1.0); 9531 outcol = mix(color1, color2, fac); 9532 outalpha = outcol.a; 9533 } 9534 9535 void valtorgb(float fac, sampler1DArray colormap, float layer, out vec4 outcol, out float outalpha) 9536 { 9537 outcol = texture(colormap, vec2(fac, layer)); 9538 outalpha = outcol.a; 9539 } 9540 9541 void valtorgb_nearest( 9542 float fac, sampler1DArray colormap, float layer, out vec4 outcol, out float outalpha) 9543 { 9544 fac = clamp(fac, 0.0, 1.0); 9545 outcol = texelFetch(colormap, ivec2(fac * (textureSize(colormap, 0).x - 1), layer), 0); 9546 outalpha = outcol.a; 9547 } 9548 9549 void rgbtobw(vec4 color, out float outval) 9550 { 9551 vec3 factors = vec3(0.2126, 0.7152, 0.0722); 9552 outval = dot(color.rgb, factors); 9553 } 9554 9555 void invert(float fac, vec4 col, out vec4 outcol) 9556 { 9557 outcol.xyz = mix(col.xyz, vec3(1.0) - col.xyz, fac); 9558 outcol.w = col.w; 9559 } 9560 9561 void clamp_vec3(vec3 vec, vec3 min, vec3 max, out vec3 out_vec) 9562 { 9563 out_vec = clamp(vec, min, max); 9564 } 9565 9566 void clamp_val(float value, float min, float max, out float out_value) 9567 { 9568 out_value = clamp(value, min, max); 9569 } 9570 9571 void hue_sat(float hue, float sat, float value, float fac, vec4 col, out vec4 outcol) 9572 { 9573 vec4 hsv; 9574 9575 rgb_to_hsv(col, hsv); 9576 9577 hsv[0] = fract(hsv[0] + hue + 0.5); 9578 hsv[1] = clamp(hsv[1] * sat, 0.0, 1.0); 9579 hsv[2] = hsv[2] * value; 9580 9581 hsv_to_rgb(hsv, outcol); 9582 9583 outcol = mix(col, outcol, fac); 9584 } 9585 9586 void separate_rgb(vec4 col, out float r, out float g, out float b) 9587 { 9588 r = col.r; 9589 g = col.g; 9590 b = col.b; 9591 } 9592 9593 void combine_rgb(float r, float g, float b, out vec4 col) 9594 { 9595 col = vec4(r, g, b, 1.0); 9596 } 9597 9598 void separate_xyz(vec3 vec, out float x, out float y, out float z) 9599 { 9600 x = vec.r; 9601 y = vec.g; 9602 z = vec.b; 9603 } 9604 9605 void combine_xyz(float x, float y, float z, out vec3 vec) 9606 { 9607 vec = vec3(x, y, z); 9608 } 9609 9610 void separate_hsv(vec4 col, out float h, out float s, out float v) 9611 { 9612 vec4 hsv; 9613 9614 rgb_to_hsv(col, hsv); 9615 h = hsv[0]; 9616 s = hsv[1]; 9617 v = hsv[2]; 9618 } 9619 9620 void combine_hsv(float h, float s, float v, out vec4 col) 9621 { 9622 hsv_to_rgb(vec4(h, s, v, 1.0), col); 9623 } 9624 9625 void output_node(vec4 rgb, float alpha, out vec4 outrgb) 9626 { 9627 outrgb = vec4(rgb.rgb, alpha); 9628 } 9629 9630 /*********** TEXTURES ***************/ 9631 9632 void texco_norm(vec3 normal, out vec3 outnormal) 9633 { 9634 /* corresponds to shi->orn, which is negated so cancels 9635 out blender normal negation */ 9636 outnormal = normalize(normal); 9637 } 9638 9639 vec3 mtex_2d_mapping(vec3 vec) 9640 { 9641 return vec3(vec.xy * 0.5 + vec2(0.5), vec.z); 9642 } 9643 9644 /** helper method to extract the upper left 3x3 matrix from a 4x4 matrix */ 9645 mat3 to_mat3(mat4 m4) 9646 { 9647 mat3 m3; 9648 m3[0] = m4[0].xyz; 9649 m3[1] = m4[1].xyz; 9650 m3[2] = m4[2].xyz; 9651 return m3; 9652 } 9653 9654 /*********** NEW SHADER UTILITIES **************/ 9655 9656 float fresnel_dielectric_0(float eta) 9657 { 9658 /* compute fresnel reflactance at normal incidence => cosi = 1.0 */ 9659 float A = (eta - 1.0) / (eta + 1.0); 9660 9661 return A * A; 9662 } 9663 9664 float fresnel_dielectric_cos(float cosi, float eta) 9665 { 9666 /* compute fresnel reflectance without explicitly computing 9667 * the refracted direction */ 9668 float c = abs(cosi); 9669 float g = eta * eta - 1.0 + c * c; 9670 float result; 9671 9672 if (g > 0.0) { 9673 g = sqrt(g); 9674 float A = (g - c) / (g + c); 9675 float B = (c * (g + c) - 1.0) / (c * (g - c) + 1.0); 9676 result = 0.5 * A * A * (1.0 + B * B); 9677 } 9678 else { 9679 result = 1.0; /* TIR (no refracted component) */ 9680 } 9681 9682 return result; 9683 } 9684 9685 float fresnel_dielectric(vec3 Incoming, vec3 Normal, float eta) 9686 { 9687 /* compute fresnel reflectance without explicitly computing 9688 * the refracted direction */ 9689 return fresnel_dielectric_cos(dot(Incoming, Normal), eta); 9690 } 9691 9692 float hypot(float x, float y) 9693 { 9694 return sqrt(x * x + y * y); 9695 } 9696 9697 void generated_from_orco(vec3 orco, out vec3 generated) 9698 { 9699 #ifdef VOLUMETRICS 9700 # ifdef MESH_SHADER 9701 generated = volumeObjectLocalCoord; 9702 # else 9703 generated = worldPosition; 9704 # endif 9705 #else 9706 generated = orco; 9707 #endif 9708 } 9709 9710 int floor_to_int(float x) 9711 { 9712 return int(floor(x)); 9713 } 9714 9715 int quick_floor(float x) 9716 { 9717 return int(x) - ((x < 0) ? 1 : 0); 9718 } 9719 9720 float integer_noise(int n) 9721 { 9722 int nn; 9723 n = (n + 1013) & 0x7fffffff; 9724 n = (n >> 13) ^ n; 9725 nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff; 9726 return 0.5 * (float(nn) / 1073741824.0); 9727 } 9728 9729 uint hash(uint kx, uint ky, uint kz) 9730 { 9731 #define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k)))) 9732 #define final(a, b, c) \ 9733 { \ 9734 c ^= b; \ 9735 c -= rot(b, 14); \ 9736 a ^= c; \ 9737 a -= rot(c, 11); \ 9738 b ^= a; \ 9739 b -= rot(a, 25); \ 9740 c ^= b; \ 9741 c -= rot(b, 16); \ 9742 a ^= c; \ 9743 a -= rot(c, 4); \ 9744 b ^= a; \ 9745 b -= rot(a, 14); \ 9746 c ^= b; \ 9747 c -= rot(b, 24); \ 9748 } 9749 // now hash the data! 9750 uint a, b, c, len = 3u; 9751 a = b = c = 0xdeadbeefu + (len << 2u) + 13u; 9752 9753 c += kz; 9754 b += ky; 9755 a += kx; 9756 final(a, b, c); 9757 9758 return c; 9759 #undef rot 9760 #undef final 9761 } 9762 9763 uint hash(int kx, int ky, int kz) 9764 { 9765 return hash(uint(kx), uint(ky), uint(kz)); 9766 } 9767 9768 float bits_to_01(uint bits) 9769 { 9770 return (float(bits) / 4294967295.0); 9771 } 9772 9773 float cellnoise(vec3 p) 9774 { 9775 int ix = quick_floor(p.x); 9776 int iy = quick_floor(p.y); 9777 int iz = quick_floor(p.z); 9778 9779 return bits_to_01(hash(uint(ix), uint(iy), uint(iz))); 9780 } 9781 9782 vec3 cellnoise_color(vec3 p) 9783 { 9784 float r = cellnoise(p.xyz); 9785 float g = cellnoise(p.yxz); 9786 float b = cellnoise(p.yzx); 9787 9788 return vec3(r, g, b); 9789 } 9790 9791 float floorfrac(float x, out int i) 9792 { 9793 i = floor_to_int(x); 9794 return x - i; 9795 } 9796 9797 /* bsdfs */ 9798 9799 vec3 tint_from_color(vec3 color) 9800 { 9801 float lum = dot(color, vec3(0.3, 0.6, 0.1)); /* luminance approx. */ 9802 return (lum > 0) ? color / lum : vec3(1.0); /* normalize lum. to isolate hue+sat */ 9803 } 9804 9805 void convert_metallic_to_specular_tinted(vec3 basecol, 9806 vec3 basecol_tint, 9807 float metallic, 9808 float specular_fac, 9809 float specular_tint, 9810 out vec3 diffuse, 9811 out vec3 f0) 9812 { 9813 vec3 tmp_col = mix(vec3(1.0), basecol_tint, specular_tint); 9814 f0 = mix((0.08 * specular_fac) * tmp_col, basecol, metallic); 9815 diffuse = basecol * (1.0 - metallic); 9816 } 9817 9818 vec3 principled_sheen(float NV, vec3 basecol_tint, float sheen_tint) 9819 { 9820 float f = 1.0 - NV; 9821 /* Temporary fix for T59784. Normal map seems to contain NaNs for tangent space normal maps, therefore we need to clamp value. */ 9822 f = clamp(f, 0.0, 1.0); 9823 /* Empirical approximation (manual curve fitting). Can be refined. */ 9824 float sheen = f * f * f * 0.077 + f * 0.01 + 0.00026; 9825 return sheen * mix(vec3(1.0), basecol_tint, sheen_tint); 9826 } 9827 9828 #ifndef VOLUMETRICS 9829 void node_bsdf_diffuse(vec4 color, float roughness, vec3 N, out Closure result) 9830 { 9831 N = normalize(N); 9832 vec3 vN = mat3(ViewMatrix) * N; 9833 result = CLOSURE_DEFAULT; 9834 result.ssr_normal = normal_encode(vN, viewCameraVec); 9835 eevee_closure_diffuse(N, color.rgb, 1.0, result.radiance); 9836 result.radiance *= color.rgb; 9837 } 9838 9839 void node_bsdf_glossy(vec4 color, float roughness, vec3 N, float ssr_id, out Closure result) 9840 { 9841 N = normalize(N); 9842 vec3 out_spec, ssr_spec; 9843 eevee_closure_glossy(N, vec3(1.0), int(ssr_id), roughness, 1.0, out_spec, ssr_spec); 9844 vec3 vN = mat3(ViewMatrix) * N; 9845 result = CLOSURE_DEFAULT; 9846 result.radiance = out_spec * color.rgb; 9847 result.ssr_data = vec4(ssr_spec * color.rgb, roughness); 9848 result.ssr_normal = normal_encode(vN, viewCameraVec); 9849 result.ssr_id = int(ssr_id); 9850 } 9851 9852 void node_bsdf_anisotropic(vec4 color, 9853 float roughness, 9854 float anisotropy, 9855 float rotation, 9856 vec3 N, 9857 vec3 T, 9858 out Closure result) 9859 { 9860 node_bsdf_glossy(color, roughness, N, -1, result); 9861 } 9862 9863 void node_bsdf_glass( 9864 vec4 color, float roughness, float ior, vec3 N, float ssr_id, out Closure result) 9865 { 9866 N = normalize(N); 9867 vec3 out_spec, out_refr, ssr_spec; 9868 vec3 refr_color = (refractionDepth > 0.0) ? color.rgb * color.rgb : 9869 color.rgb; /* Simulate 2 transmission event */ 9870 eevee_closure_glass( 9871 N, vec3(1.0), int(ssr_id), roughness, 1.0, ior, out_spec, out_refr, ssr_spec); 9872 out_refr *= refr_color; 9873 out_spec *= color.rgb; 9874 float fresnel = F_eta(ior, dot(N, cameraVec)); 9875 vec3 vN = mat3(ViewMatrix) * N; 9876 result = CLOSURE_DEFAULT; 9877 result.radiance = mix(out_refr, out_spec, fresnel); 9878 result.ssr_data = vec4(ssr_spec * color.rgb * fresnel, roughness); 9879 result.ssr_normal = normal_encode(vN, viewCameraVec); 9880 result.ssr_id = int(ssr_id); 9881 } 9882 9883 void node_bsdf_toon(vec4 color, float size, float tsmooth, vec3 N, out Closure result) 9884 { 9885 node_bsdf_diffuse(color, 0.0, N, result); 9886 } 9887 9888 void node_bsdf_principled(vec4 base_color, 9889 float subsurface, 9890 vec3 subsurface_radius, 9891 vec4 subsurface_color, 9892 float metallic, 9893 float specular, 9894 float specular_tint, 9895 float roughness, 9896 float anisotropic, 9897 float anisotropic_rotation, 9898 float sheen, 9899 float sheen_tint, 9900 float clearcoat, 9901 float clearcoat_roughness, 9902 float ior, 9903 float transmission, 9904 float transmission_roughness, 9905 vec3 N, 9906 vec3 CN, 9907 vec3 T, 9908 vec3 I, 9909 float ssr_id, 9910 float sss_id, 9911 vec3 sss_scale, 9912 out Closure result) 9913 { 9914 N = normalize(N); 9915 ior = max(ior, 1e-5); 9916 metallic = saturate(metallic); 9917 transmission = saturate(transmission); 9918 float dielectric = 1.0 - metallic; 9919 transmission *= dielectric; 9920 sheen *= dielectric; 9921 subsurface_color *= dielectric; 9922 9923 vec3 diffuse, f0, out_diff, out_spec, out_trans, out_refr, ssr_spec; 9924 vec3 ctint = tint_from_color(base_color.rgb); 9925 convert_metallic_to_specular_tinted( 9926 base_color.rgb, ctint, metallic, specular, specular_tint, diffuse, f0); 9927 9928 float NV = dot(N, cameraVec); 9929 vec3 out_sheen = sheen * principled_sheen(NV, ctint, sheen_tint); 9930 9931 /* Far from being accurate, but 2 glossy evaluation is too expensive. 9932 * Most noticeable difference is at grazing angles since the bsdf lut 9933 * f0 color interpolation is done on top of this interpolation. */ 9934 vec3 f0_glass = mix(vec3(1.0), base_color.rgb, specular_tint); 9935 float fresnel = F_eta(ior, NV); 9936 vec3 spec_col = F_color_blend(ior, fresnel, f0_glass) * fresnel; 9937 f0 = mix(f0, spec_col, transmission); 9938 9939 vec3 mixed_ss_base_color = mix(diffuse, subsurface_color.rgb, subsurface); 9940 9941 float sss_scalef = dot(sss_scale, vec3(1.0 / 3.0)) * subsurface; 9942 eevee_closure_principled(N, 9943 mixed_ss_base_color, 9944 f0, 9945 int(ssr_id), 9946 roughness, 9947 CN, 9948 clearcoat * 0.25, 9949 clearcoat_roughness, 9950 1.0, 9951 sss_scalef, 9952 ior, 9953 out_diff, 9954 out_trans, 9955 out_spec, 9956 out_refr, 9957 ssr_spec); 9958 9959 vec3 refr_color = base_color.rgb; 9960 refr_color *= (refractionDepth > 0.0) ? refr_color : 9961 vec3(1.0); /* Simulate 2 transmission event */ 9962 out_refr *= refr_color * (1.0 - fresnel) * transmission; 9963 9964 vec3 vN = mat3(ViewMatrix) * N; 9965 result = CLOSURE_DEFAULT; 9966 result.radiance = out_spec + out_refr; 9967 result.radiance += out_diff * out_sheen; /* Coarse approx. */ 9968 # ifndef USE_SSS 9969 result.radiance += (out_diff + out_trans) * mixed_ss_base_color * (1.0 - transmission); 9970 # endif 9971 result.ssr_data = vec4(ssr_spec, roughness); 9972 result.ssr_normal = normal_encode(vN, viewCameraVec); 9973 result.ssr_id = int(ssr_id); 9974 # ifdef USE_SSS 9975 result.sss_data.a = sss_scalef; 9976 result.sss_data.rgb = out_diff + out_trans; 9977 # ifdef USE_SSS_ALBEDO 9978 result.sss_albedo.rgb = mixed_ss_base_color; 9979 # else 9980 result.sss_data.rgb *= mixed_ss_base_color; 9981 # endif 9982 result.sss_data.rgb *= (1.0 - transmission); 9983 # endif 9984 } 9985 9986 void node_bsdf_principled_dielectric(vec4 base_color, 9987 float subsurface, 9988 vec3 subsurface_radius, 9989 vec4 subsurface_color, 9990 float metallic, 9991 float specular, 9992 float specular_tint, 9993 float roughness, 9994 float anisotropic, 9995 float anisotropic_rotation, 9996 float sheen, 9997 float sheen_tint, 9998 float clearcoat, 9999 float clearcoat_roughness, 10000 float ior, 10001 float transmission, 10002 float transmission_roughness, 10003 vec3 N, 10004 vec3 CN, 10005 vec3 T, 10006 vec3 I, 10007 float ssr_id, 10008 float sss_id, 10009 vec3 sss_scale, 10010 out Closure result) 10011 { 10012 N = normalize(N); 10013 metallic = saturate(metallic); 10014 float dielectric = 1.0 - metallic; 10015 10016 vec3 diffuse, f0, out_diff, out_spec, ssr_spec; 10017 vec3 ctint = tint_from_color(base_color.rgb); 10018 convert_metallic_to_specular_tinted( 10019 base_color.rgb, ctint, metallic, specular, specular_tint, diffuse, f0); 10020 10021 float NV = dot(N, cameraVec); 10022 vec3 out_sheen = sheen * principled_sheen(NV, ctint, sheen_tint); 10023 10024 eevee_closure_default(N, diffuse, f0, int(ssr_id), roughness, 1.0, out_diff, out_spec, ssr_spec); 10025 10026 vec3 vN = mat3(ViewMatrix) * N; 10027 result = CLOSURE_DEFAULT; 10028 result.radiance = out_spec + out_diff * (diffuse + out_sheen); 10029 result.ssr_data = vec4(ssr_spec, roughness); 10030 result.ssr_normal = normal_encode(vN, viewCameraVec); 10031 result.ssr_id = int(ssr_id); 10032 } 10033 10034 void node_bsdf_principled_metallic(vec4 base_color, 10035 float subsurface, 10036 vec3 subsurface_radius, 10037 vec4 subsurface_color, 10038 float metallic, 10039 float specular, 10040 float specular_tint, 10041 float roughness, 10042 float anisotropic, 10043 float anisotropic_rotation, 10044 float sheen, 10045 float sheen_tint, 10046 float clearcoat, 10047 float clearcoat_roughness, 10048 float ior, 10049 float transmission, 10050 float transmission_roughness, 10051 vec3 N, 10052 vec3 CN, 10053 vec3 T, 10054 vec3 I, 10055 float ssr_id, 10056 float sss_id, 10057 vec3 sss_scale, 10058 out Closure result) 10059 { 10060 N = normalize(N); 10061 vec3 out_spec, ssr_spec; 10062 10063 eevee_closure_glossy(N, base_color.rgb, int(ssr_id), roughness, 1.0, out_spec, ssr_spec); 10064 10065 vec3 vN = mat3(ViewMatrix) * N; 10066 result = CLOSURE_DEFAULT; 10067 result.radiance = out_spec; 10068 result.ssr_data = vec4(ssr_spec, roughness); 10069 result.ssr_normal = normal_encode(vN, viewCameraVec); 10070 result.ssr_id = int(ssr_id); 10071 } 10072 10073 void node_bsdf_principled_clearcoat(vec4 base_color, 10074 float subsurface, 10075 vec3 subsurface_radius, 10076 vec4 subsurface_color, 10077 float metallic, 10078 float specular, 10079 float specular_tint, 10080 float roughness, 10081 float anisotropic, 10082 float anisotropic_rotation, 10083 float sheen, 10084 float sheen_tint, 10085 float clearcoat, 10086 float clearcoat_roughness, 10087 float ior, 10088 float transmission, 10089 float transmission_roughness, 10090 vec3 N, 10091 vec3 CN, 10092 vec3 T, 10093 vec3 I, 10094 float ssr_id, 10095 float sss_id, 10096 vec3 sss_scale, 10097 out Closure result) 10098 { 10099 vec3 out_spec, ssr_spec; 10100 N = normalize(N); 10101 10102 eevee_closure_clearcoat(N, 10103 base_color.rgb, 10104 int(ssr_id), 10105 roughness, 10106 CN, 10107 clearcoat * 0.25, 10108 clearcoat_roughness, 10109 1.0, 10110 out_spec, 10111 ssr_spec); 10112 10113 vec3 vN = mat3(ViewMatrix) * N; 10114 result = CLOSURE_DEFAULT; 10115 result.radiance = out_spec; 10116 result.ssr_data = vec4(ssr_spec, roughness); 10117 result.ssr_normal = normal_encode(vN, viewCameraVec); 10118 result.ssr_id = int(ssr_id); 10119 } 10120 10121 void node_bsdf_principled_subsurface(vec4 base_color, 10122 float subsurface, 10123 vec3 subsurface_radius, 10124 vec4 subsurface_color, 10125 float metallic, 10126 float specular, 10127 float specular_tint, 10128 float roughness, 10129 float anisotropic, 10130 float anisotropic_rotation, 10131 float sheen, 10132 float sheen_tint, 10133 float clearcoat, 10134 float clearcoat_roughness, 10135 float ior, 10136 float transmission, 10137 float transmission_roughness, 10138 vec3 N, 10139 vec3 CN, 10140 vec3 T, 10141 vec3 I, 10142 float ssr_id, 10143 float sss_id, 10144 vec3 sss_scale, 10145 out Closure result) 10146 { 10147 metallic = saturate(metallic); 10148 N = normalize(N); 10149 10150 vec3 diffuse, f0, out_diff, out_spec, out_trans, ssr_spec; 10151 vec3 ctint = tint_from_color(base_color.rgb); 10152 convert_metallic_to_specular_tinted( 10153 base_color.rgb, ctint, metallic, specular, specular_tint, diffuse, f0); 10154 10155 subsurface_color = subsurface_color * (1.0 - metallic); 10156 vec3 mixed_ss_base_color = mix(diffuse, subsurface_color.rgb, subsurface); 10157 float sss_scalef = dot(sss_scale, vec3(1.0 / 3.0)) * subsurface; 10158 10159 float NV = dot(N, cameraVec); 10160 vec3 out_sheen = sheen * principled_sheen(NV, ctint, sheen_tint); 10161 10162 eevee_closure_skin(N, 10163 mixed_ss_base_color, 10164 f0, 10165 int(ssr_id), 10166 roughness, 10167 1.0, 10168 sss_scalef, 10169 out_diff, 10170 out_trans, 10171 out_spec, 10172 ssr_spec); 10173 10174 vec3 vN = mat3(ViewMatrix) * N; 10175 result = CLOSURE_DEFAULT; 10176 result.radiance = out_spec; 10177 result.ssr_data = vec4(ssr_spec, roughness); 10178 result.ssr_normal = normal_encode(vN, viewCameraVec); 10179 result.ssr_id = int(ssr_id); 10180 # ifdef USE_SSS 10181 result.sss_data.a = sss_scalef; 10182 result.sss_data.rgb = out_diff + out_trans; 10183 # ifdef USE_SSS_ALBEDO 10184 result.sss_albedo.rgb = mixed_ss_base_color; 10185 # else 10186 result.sss_data.rgb *= mixed_ss_base_color; 10187 # endif 10188 # else 10189 result.radiance += (out_diff + out_trans) * mixed_ss_base_color; 10190 # endif 10191 result.radiance += out_diff * out_sheen; 10192 } 10193 10194 void node_bsdf_principled_glass(vec4 base_color, 10195 float subsurface, 10196 vec3 subsurface_radius, 10197 vec4 subsurface_color, 10198 float metallic, 10199 float specular, 10200 float specular_tint, 10201 float roughness, 10202 float anisotropic, 10203 float anisotropic_rotation, 10204 float sheen, 10205 float sheen_tint, 10206 float clearcoat, 10207 float clearcoat_roughness, 10208 float ior, 10209 float transmission, 10210 float transmission_roughness, 10211 vec3 N, 10212 vec3 CN, 10213 vec3 T, 10214 vec3 I, 10215 float ssr_id, 10216 float sss_id, 10217 vec3 sss_scale, 10218 out Closure result) 10219 { 10220 ior = max(ior, 1e-5); 10221 N = normalize(N); 10222 10223 vec3 f0, out_spec, out_refr, ssr_spec; 10224 f0 = mix(vec3(1.0), base_color.rgb, specular_tint); 10225 10226 eevee_closure_glass( 10227 N, vec3(1.0), int(ssr_id), roughness, 1.0, ior, out_spec, out_refr, ssr_spec); 10228 10229 vec3 refr_color = base_color.rgb; 10230 refr_color *= (refractionDepth > 0.0) ? refr_color : 10231 vec3(1.0); /* Simulate 2 transmission events */ 10232 out_refr *= refr_color; 10233 10234 float fresnel = F_eta(ior, dot(N, cameraVec)); 10235 vec3 spec_col = F_color_blend(ior, fresnel, f0); 10236 out_spec *= spec_col; 10237 ssr_spec *= spec_col * fresnel; 10238 10239 vec3 vN = mat3(ViewMatrix) * N; 10240 result = CLOSURE_DEFAULT; 10241 result.radiance = mix(out_refr, out_spec, fresnel); 10242 result.ssr_data = vec4(ssr_spec, roughness); 10243 result.ssr_normal = normal_encode(vN, viewCameraVec); 10244 result.ssr_id = int(ssr_id); 10245 } 10246 10247 void node_bsdf_translucent(vec4 color, vec3 N, out Closure result) 10248 { 10249 node_bsdf_diffuse(color, 0.0, -N, result); 10250 } 10251 10252 void node_bsdf_transparent(vec4 color, out Closure result) 10253 { 10254 /* this isn't right */ 10255 result = CLOSURE_DEFAULT; 10256 result.radiance = vec3(0.0); 10257 result.opacity = clamp(1.0 - dot(color.rgb, vec3(0.3333334)), 0.0, 1.0); 10258 result.ssr_id = TRANSPARENT_CLOSURE_FLAG; 10259 } 10260 10261 void node_bsdf_velvet(vec4 color, float sigma, vec3 N, out Closure result) 10262 { 10263 node_bsdf_diffuse(color, 0.0, N, result); 10264 } 10265 10266 void node_subsurface_scattering(vec4 color, 10267 float scale, 10268 vec3 radius, 10269 float sharpen, 10270 float texture_blur, 10271 vec3 N, 10272 float sss_id, 10273 out Closure result) 10274 { 10275 # if defined(USE_SSS) 10276 N = normalize(N); 10277 vec3 out_diff, out_trans; 10278 vec3 vN = mat3(ViewMatrix) * N; 10279 result = CLOSURE_DEFAULT; 10280 result.ssr_data = vec4(0.0); 10281 result.ssr_normal = normal_encode(vN, viewCameraVec); 10282 result.ssr_id = -1; 10283 result.sss_data.a = scale; 10284 eevee_closure_subsurface(N, color.rgb, 1.0, scale, out_diff, out_trans); 10285 result.sss_data.rgb = out_diff + out_trans; 10286 # ifdef USE_SSS_ALBEDO 10287 /* Not perfect for texture_blur not exactly equal to 0.0 or 1.0. */ 10288 result.sss_albedo.rgb = mix(color.rgb, vec3(1.0), texture_blur); 10289 result.sss_data.rgb *= mix(vec3(1.0), color.rgb, texture_blur); 10290 # else 10291 result.sss_data.rgb *= color.rgb; 10292 # endif 10293 # else 10294 node_bsdf_diffuse(color, 0.0, N, result); 10295 # endif 10296 } 10297 10298 void node_bsdf_refraction(vec4 color, float roughness, float ior, vec3 N, out Closure result) 10299 { 10300 N = normalize(N); 10301 vec3 out_refr; 10302 color.rgb *= (refractionDepth > 0.0) ? color.rgb : vec3(1.0); /* Simulate 2 absorption event. */ 10303 eevee_closure_refraction(N, roughness, ior, out_refr); 10304 vec3 vN = mat3(ViewMatrix) * N; 10305 result = CLOSURE_DEFAULT; 10306 result.ssr_normal = normal_encode(vN, viewCameraVec); 10307 result.radiance = out_refr * color.rgb; 10308 result.ssr_id = REFRACT_CLOSURE_FLAG; 10309 } 10310 10311 void node_ambient_occlusion( 10312 vec4 color, float distance, vec3 normal, out vec4 result_color, out float result_ao) 10313 { 10314 vec3 bent_normal; 10315 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 10316 result_ao = occlusion_compute(normalize(normal), viewPosition, 1.0, rand, bent_normal); 10317 result_color = result_ao * color; 10318 } 10319 10320 #endif /* VOLUMETRICS */ 10321 10322 /* emission */ 10323 10324 void node_emission(vec4 color, float strength, vec3 vN, out Closure result) 10325 { 10326 #ifndef VOLUMETRICS 10327 color *= strength; 10328 result = CLOSURE_DEFAULT; 10329 result.radiance = color.rgb; 10330 result.opacity = color.a; 10331 result.ssr_normal = normal_encode(vN, viewCameraVec); 10332 #else 10333 result = Closure(vec3(0.0), vec3(0.0), color.rgb * strength, 0.0); 10334 #endif 10335 } 10336 10337 void node_wireframe(float size, vec2 barycentric, vec3 barycentric_dist, out float fac) 10338 { 10339 vec3 barys = barycentric.xyy; 10340 barys.z = 1.0 - barycentric.x - barycentric.y; 10341 10342 size *= 0.5; 10343 vec3 s = step(-size, -barys * barycentric_dist); 10344 10345 fac = max(s.x, max(s.y, s.z)); 10346 } 10347 10348 void node_wireframe_screenspace(float size, vec2 barycentric, out float fac) 10349 { 10350 vec3 barys = barycentric.xyy; 10351 barys.z = 1.0 - barycentric.x - barycentric.y; 10352 10353 size *= (1.0 / 3.0); 10354 vec3 dx = dFdx(barys); 10355 vec3 dy = dFdy(barys); 10356 vec3 deltas = sqrt(dx * dx + dy * dy); 10357 10358 vec3 s = step(-deltas * size, -barys); 10359 10360 fac = max(s.x, max(s.y, s.z)); 10361 } 10362 10363 /* background */ 10364 10365 void node_tex_environment_texco(vec3 viewvec, out vec3 worldvec) 10366 { 10367 #ifdef MESH_SHADER 10368 worldvec = worldPosition; 10369 #else 10370 vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(viewvec, 1.0) : vec4(0.0, 0.0, 1.0, 1.0); 10371 vec4 co_homogenous = (ProjectionMatrixInverse * v); 10372 10373 vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0); 10374 # if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE) 10375 worldvec = (ViewMatrixInverse * co).xyz; 10376 # else 10377 worldvec = (ModelViewMatrixInverse * co).xyz; 10378 # endif 10379 #endif 10380 } 10381 10382 void node_background(vec4 color, float strength, out Closure result) 10383 { 10384 #ifndef VOLUMETRICS 10385 color *= strength; 10386 result = CLOSURE_DEFAULT; 10387 result.radiance = color.rgb; 10388 result.opacity = color.a; 10389 #else 10390 result = CLOSURE_DEFAULT; 10391 #endif 10392 } 10393 10394 /* volumes */ 10395 10396 void node_volume_scatter(vec4 color, float density, float anisotropy, out Closure result) 10397 { 10398 #ifdef VOLUMETRICS 10399 result = Closure(vec3(0.0), color.rgb * density, vec3(0.0), anisotropy); 10400 #else 10401 result = CLOSURE_DEFAULT; 10402 #endif 10403 } 10404 10405 void node_volume_absorption(vec4 color, float density, out Closure result) 10406 { 10407 #ifdef VOLUMETRICS 10408 result = Closure((1.0 - color.rgb) * density, vec3(0.0), vec3(0.0), 0.0); 10409 #else 10410 result = CLOSURE_DEFAULT; 10411 #endif 10412 } 10413 10414 void node_blackbody(float temperature, sampler1DArray spectrummap, float layer, out vec4 color) 10415 { 10416 if (temperature >= 12000.0) { 10417 color = vec4(0.826270103, 0.994478524, 1.56626022, 1.0); 10418 } 10419 else if (temperature < 965.0) { 10420 color = vec4(4.70366907, 0.0, 0.0, 1.0); 10421 } 10422 else { 10423 float t = (temperature - 965.0) / (12000.0 - 965.0); 10424 color = vec4(texture(spectrummap, vec2(t, layer)).rgb, 1.0); 10425 } 10426 } 10427 10428 void node_volume_principled(vec4 color, 10429 float density, 10430 float anisotropy, 10431 vec4 absorption_color, 10432 float emission_strength, 10433 vec4 emission_color, 10434 float blackbody_intensity, 10435 vec4 blackbody_tint, 10436 float temperature, 10437 float density_attribute, 10438 vec4 color_attribute, 10439 float temperature_attribute, 10440 sampler1DArray spectrummap, 10441 float layer, 10442 out Closure result) 10443 { 10444 #ifdef VOLUMETRICS 10445 vec3 absorption_coeff = vec3(0.0); 10446 vec3 scatter_coeff = vec3(0.0); 10447 vec3 emission_coeff = vec3(0.0); 10448 10449 /* Compute density. */ 10450 density = max(density, 0.0); 10451 10452 if (density > 1e-5) { 10453 density = max(density * density_attribute, 0.0); 10454 } 10455 10456 if (density > 1e-5) { 10457 /* Compute scattering and absorption coefficients. */ 10458 vec3 scatter_color = color.rgb * color_attribute.rgb; 10459 10460 scatter_coeff = scatter_color * density; 10461 absorption_color.rgb = sqrt(max(absorption_color.rgb, 0.0)); 10462 absorption_coeff = max(1.0 - scatter_color, 0.0) * max(1.0 - absorption_color.rgb, 0.0) * 10463 density; 10464 } 10465 10466 /* Compute emission. */ 10467 emission_strength = max(emission_strength, 0.0); 10468 10469 if (emission_strength > 1e-5) { 10470 emission_coeff += emission_strength * emission_color.rgb; 10471 } 10472 10473 if (blackbody_intensity > 1e-3) { 10474 /* Add temperature from attribute. */ 10475 float T = max(temperature * max(temperature_attribute, 0.0), 0.0); 10476 10477 /* Stefan-Boltzman law. */ 10478 float T2 = T * T; 10479 float T4 = T2 * T2; 10480 float sigma = 5.670373e-8 * 1e-6 / M_PI; 10481 float intensity = sigma * mix(1.0, T4, blackbody_intensity); 10482 10483 if (intensity > 1e-5) { 10484 vec4 bb; 10485 node_blackbody(T, spectrummap, layer, bb); 10486 emission_coeff += bb.rgb * blackbody_tint.rgb * intensity; 10487 } 10488 } 10489 10490 result = Closure(absorption_coeff, scatter_coeff, emission_coeff, anisotropy); 10491 #else 10492 result = CLOSURE_DEFAULT; 10493 #endif 10494 } 10495 10496 /* closures */ 10497 10498 void node_mix_shader(float fac, Closure shader1, Closure shader2, out Closure shader) 10499 { 10500 shader = closure_mix(shader1, shader2, fac); 10501 } 10502 10503 void node_add_shader(Closure shader1, Closure shader2, out Closure shader) 10504 { 10505 shader = closure_add(shader1, shader2); 10506 } 10507 10508 /* fresnel */ 10509 10510 void node_fresnel(float ior, vec3 N, vec3 I, out float result) 10511 { 10512 N = normalize(N); 10513 /* handle perspective/orthographic */ 10514 vec3 I_view = (ProjectionMatrix[3][3] == 0.0) ? normalize(I) : vec3(0.0, 0.0, -1.0); 10515 10516 float eta = max(ior, 0.00001); 10517 result = fresnel_dielectric(I_view, N, (gl_FrontFacing) ? eta : 1.0 / eta); 10518 } 10519 10520 /* layer_weight */ 10521 10522 void node_layer_weight(float blend, vec3 N, vec3 I, out float fresnel, out float facing) 10523 { 10524 N = normalize(N); 10525 10526 /* fresnel */ 10527 float eta = max(1.0 - blend, 0.00001); 10528 vec3 I_view = (ProjectionMatrix[3][3] == 0.0) ? normalize(I) : vec3(0.0, 0.0, -1.0); 10529 10530 fresnel = fresnel_dielectric(I_view, N, (gl_FrontFacing) ? 1.0 / eta : eta); 10531 10532 /* facing */ 10533 facing = abs(dot(I_view, N)); 10534 if (blend != 0.5) { 10535 blend = clamp(blend, 0.0, 0.99999); 10536 blend = (blend < 0.5) ? 2.0 * blend : 0.5 / (1.0 - blend); 10537 facing = pow(facing, blend); 10538 } 10539 facing = 1.0 - facing; 10540 } 10541 10542 /* gamma */ 10543 10544 void node_gamma(vec4 col, float gamma, out vec4 outcol) 10545 { 10546 outcol = col; 10547 10548 if (col.r > 0.0) 10549 outcol.r = compatible_pow(col.r, gamma); 10550 if (col.g > 0.0) 10551 outcol.g = compatible_pow(col.g, gamma); 10552 if (col.b > 0.0) 10553 outcol.b = compatible_pow(col.b, gamma); 10554 } 10555 10556 /* geometry */ 10557 10558 void node_attribute_volume_density(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf) 10559 { 10560 #if defined(MESH_SHADER) && defined(VOLUMETRICS) 10561 vec3 cos = volumeObjectLocalCoord; 10562 #else 10563 vec3 cos = vec3(0.0); 10564 #endif 10565 outvec = texture(tex, cos).aaa; 10566 outcol = vec4(outvec, 1.0); 10567 outf = dot(vec3(1.0 / 3.0), outvec); 10568 } 10569 10570 uniform vec3 volumeColor = vec3(1.0); 10571 10572 void node_attribute_volume_color(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf) 10573 { 10574 #if defined(MESH_SHADER) && defined(VOLUMETRICS) 10575 vec3 cos = volumeObjectLocalCoord; 10576 #else 10577 vec3 cos = vec3(0.0); 10578 #endif 10579 10580 vec4 value = texture(tex, cos).rgba; 10581 /* Density is premultiplied for interpolation, divide it out here. */ 10582 if (value.a > 1e-8) 10583 value.rgb /= value.a; 10584 10585 outvec = value.rgb * volumeColor; 10586 outcol = vec4(outvec, 1.0); 10587 outf = dot(vec3(1.0 / 3.0), outvec); 10588 } 10589 10590 void node_attribute_volume_flame(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf) 10591 { 10592 #if defined(MESH_SHADER) && defined(VOLUMETRICS) 10593 vec3 cos = volumeObjectLocalCoord; 10594 #else 10595 vec3 cos = vec3(0.0); 10596 #endif 10597 outf = texture(tex, cos).r; 10598 outvec = vec3(outf, outf, outf); 10599 outcol = vec4(outf, outf, outf, 1.0); 10600 } 10601 10602 void node_attribute_volume_temperature( 10603 sampler3D tex, vec2 temperature, out vec4 outcol, out vec3 outvec, out float outf) 10604 { 10605 #if defined(MESH_SHADER) && defined(VOLUMETRICS) 10606 vec3 cos = volumeObjectLocalCoord; 10607 #else 10608 vec3 cos = vec3(0.0); 10609 #endif 10610 float flame = texture(tex, cos).r; 10611 10612 outf = (flame > 0.01) ? temperature.x + flame * (temperature.y - temperature.x) : 0.0; 10613 outvec = vec3(outf, outf, outf); 10614 outcol = vec4(outf, outf, outf, 1.0); 10615 } 10616 10617 void node_attribute(vec3 attr, out vec4 outcol, out vec3 outvec, out float outf) 10618 { 10619 outcol = vec4(attr, 1.0); 10620 outvec = attr; 10621 outf = dot(vec3(1.0 / 3.0), attr); 10622 } 10623 10624 void node_uvmap(vec3 attr_uv, out vec3 outvec) 10625 { 10626 outvec = attr_uv; 10627 } 10628 10629 void tangent_orco_x(vec3 orco_in, out vec3 orco_out) 10630 { 10631 orco_out = orco_in.xzy * vec3(0.0, -0.5, 0.5) + vec3(0.0, 0.25, -0.25); 10632 } 10633 10634 void tangent_orco_y(vec3 orco_in, out vec3 orco_out) 10635 { 10636 orco_out = orco_in.zyx * vec3(-0.5, 0.0, 0.5) + vec3(0.25, 0.0, -0.25); 10637 } 10638 10639 void tangent_orco_z(vec3 orco_in, out vec3 orco_out) 10640 { 10641 orco_out = orco_in.yxz * vec3(-0.5, 0.5, 0.0) + vec3(0.25, -0.25, 0.0); 10642 } 10643 10644 void node_tangentmap(vec4 attr_tangent, mat4 toworld, out vec3 tangent) 10645 { 10646 tangent = normalize((toworld * vec4(attr_tangent.xyz, 0.0)).xyz); 10647 } 10648 10649 void node_tangent(vec3 N, vec3 orco, mat4 objmat, mat4 toworld, out vec3 T) 10650 { 10651 #ifndef VOLUMETRICS 10652 N = normalize(gl_FrontFacing ? worldNormal : -worldNormal); 10653 #else 10654 N = (toworld * vec4(N, 0.0)).xyz; 10655 #endif 10656 T = (objmat * vec4(orco, 0.0)).xyz; 10657 T = cross(N, normalize(cross(T, N))); 10658 } 10659 10660 void node_geometry(vec3 I, 10661 vec3 N, 10662 vec3 orco, 10663 mat4 objmat, 10664 mat4 toworld, 10665 vec2 barycentric, 10666 out vec3 position, 10667 out vec3 normal, 10668 out vec3 tangent, 10669 out vec3 true_normal, 10670 out vec3 incoming, 10671 out vec3 parametric, 10672 out float backfacing, 10673 out float pointiness) 10674 { 10675 /* handle perspective/orthographic */ 10676 vec3 I_view = (ProjectionMatrix[3][3] == 0.0) ? normalize(I) : vec3(0.0, 0.0, -1.0); 10677 incoming = -(toworld * vec4(I_view, 0.0)).xyz; 10678 10679 #if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE) 10680 position = -incoming; 10681 true_normal = normal = incoming; 10682 tangent = parametric = vec3(0.0); 10683 vec3(0.0); 10684 backfacing = 0.0; 10685 pointiness = 0.0; 10686 #else 10687 10688 position = worldPosition; 10689 # ifndef VOLUMETRICS 10690 normal = normalize(gl_FrontFacing ? worldNormal : -worldNormal); 10691 vec3 B = dFdx(worldPosition); 10692 vec3 T = dFdy(worldPosition); 10693 true_normal = normalize(cross(B, T)); 10694 # else 10695 normal = (toworld * vec4(N, 0.0)).xyz; 10696 true_normal = normal; 10697 # endif 10698 tangent_orco_z(orco, orco); 10699 node_tangent(N, orco, objmat, toworld, tangent); 10700 10701 parametric = vec3(barycentric, 0.0); 10702 backfacing = (gl_FrontFacing) ? 0.0 : 1.0; 10703 pointiness = 0.5; 10704 #endif 10705 } 10706 10707 void generated_texco(vec3 I, vec3 attr_orco, out vec3 generated) 10708 { 10709 vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(I, 1.0) : vec4(0.0, 0.0, 1.0, 1.0); 10710 vec4 co_homogenous = (ProjectionMatrixInverse * v); 10711 vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0); 10712 co.xyz = normalize(co.xyz); 10713 #if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE) 10714 generated = (ViewMatrixInverse * co).xyz; 10715 #else 10716 generated_from_orco(attr_orco, generated); 10717 #endif 10718 } 10719 10720 void node_tex_coord(vec3 I, 10721 vec3 N, 10722 mat4 viewinvmat, 10723 mat4 obinvmat, 10724 vec4 camerafac, 10725 vec3 attr_orco, 10726 vec3 attr_uv, 10727 out vec3 generated, 10728 out vec3 normal, 10729 out vec3 uv, 10730 out vec3 object, 10731 out vec3 camera, 10732 out vec3 window, 10733 out vec3 reflection) 10734 { 10735 generated = attr_orco; 10736 normal = normalize(NormalMatrixInverse * N); 10737 uv = attr_uv; 10738 object = (obinvmat * (viewinvmat * vec4(I, 1.0))).xyz; 10739 camera = vec3(I.xy, -I.z); 10740 vec4 projvec = ProjectionMatrix * vec4(I, 1.0); 10741 window = vec3(mtex_2d_mapping(projvec.xyz / projvec.w).xy * camerafac.xy + camerafac.zw, 0.0); 10742 10743 vec3 shade_I = (ProjectionMatrix[3][3] == 0.0) ? normalize(I) : vec3(0.0, 0.0, -1.0); 10744 vec3 view_reflection = reflect(shade_I, normalize(N)); 10745 reflection = (viewinvmat * vec4(view_reflection, 0.0)).xyz; 10746 } 10747 10748 void node_tex_coord_background(vec3 I, 10749 vec3 N, 10750 mat4 viewinvmat, 10751 mat4 obinvmat, 10752 vec4 camerafac, 10753 vec3 attr_orco, 10754 vec3 attr_uv, 10755 out vec3 generated, 10756 out vec3 normal, 10757 out vec3 uv, 10758 out vec3 object, 10759 out vec3 camera, 10760 out vec3 window, 10761 out vec3 reflection) 10762 { 10763 vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(I, 1.0) : vec4(0.0, 0.0, 1.0, 1.0); 10764 vec4 co_homogenous = (ProjectionMatrixInverse * v); 10765 10766 vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0); 10767 10768 co = normalize(co); 10769 10770 #if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE) 10771 vec3 coords = (ViewMatrixInverse * co).xyz; 10772 #else 10773 vec3 coords = (ModelViewMatrixInverse * co).xyz; 10774 #endif 10775 10776 generated = coords; 10777 normal = -coords; 10778 uv = vec3(attr_uv.xy, 0.0); 10779 object = coords; 10780 10781 camera = vec3(co.xy, -co.z); 10782 window = vec3(mtex_2d_mapping(I).xy * camerafac.xy + camerafac.zw, 0.0); 10783 10784 reflection = -coords; 10785 } 10786 10787 #if defined(WORLD_BACKGROUND) || (defined(PROBE_CAPTURE) && !defined(MESH_SHADER)) 10788 # define node_tex_coord node_tex_coord_background 10789 #endif 10790 10791 /* textures */ 10792 10793 float calc_gradient(vec3 p, int gradient_type) 10794 { 10795 float x, y, z; 10796 x = p.x; 10797 y = p.y; 10798 z = p.z; 10799 if (gradient_type == 0) { /* linear */ 10800 return x; 10801 } 10802 else if (gradient_type == 1) { /* quadratic */ 10803 float r = max(x, 0.0); 10804 return r * r; 10805 } 10806 else if (gradient_type == 2) { /* easing */ 10807 float r = min(max(x, 0.0), 1.0); 10808 float t = r * r; 10809 return (3.0 * t - 2.0 * t * r); 10810 } 10811 else if (gradient_type == 3) { /* diagonal */ 10812 return (x + y) * 0.5; 10813 } 10814 else if (gradient_type == 4) { /* radial */ 10815 return atan(y, x) / (M_PI * 2) + 0.5; 10816 } 10817 else { 10818 /* Bias a little bit for the case where p is a unit length vector, 10819 * to get exactly zero instead of a small random value depending 10820 * on float precision. */ 10821 float r = max(0.999999 - sqrt(x * x + y * y + z * z), 0.0); 10822 if (gradient_type == 5) { /* quadratic sphere */ 10823 return r * r; 10824 } 10825 else if (gradient_type == 6) { /* sphere */ 10826 return r; 10827 } 10828 } 10829 return 0.0; 10830 } 10831 10832 void node_tex_gradient(vec3 co, float gradient_type, out vec4 color, out float fac) 10833 { 10834 float f = calc_gradient(co, int(gradient_type)); 10835 f = clamp(f, 0.0, 1.0); 10836 10837 color = vec4(f, f, f, 1.0); 10838 fac = f; 10839 } 10840 10841 void node_tex_checker( 10842 vec3 co, vec4 color1, vec4 color2, float scale, out vec4 color, out float fac) 10843 { 10844 vec3 p = co * scale; 10845 10846 /* Prevent precision issues on unit coordinates. */ 10847 p = (p + 0.000001) * 0.999999; 10848 10849 int xi = int(abs(floor(p.x))); 10850 int yi = int(abs(floor(p.y))); 10851 int zi = int(abs(floor(p.z))); 10852 10853 bool check = ((mod(xi, 2) == mod(yi, 2)) == bool(mod(zi, 2))); 10854 10855 color = check ? color1 : color2; 10856 fac = check ? 1.0 : 0.0; 10857 } 10858 10859 vec2 calc_brick_texture(vec3 p, 10860 float mortar_size, 10861 float mortar_smooth, 10862 float bias, 10863 float brick_width, 10864 float row_height, 10865 float offset_amount, 10866 int offset_frequency, 10867 float squash_amount, 10868 int squash_frequency) 10869 { 10870 int bricknum, rownum; 10871 float offset = 0.0; 10872 float x, y; 10873 10874 rownum = floor_to_int(p.y / row_height); 10875 10876 if (offset_frequency != 0 && squash_frequency != 0) { 10877 brick_width *= (rownum % squash_frequency != 0) ? 1.0 : squash_amount; /* squash */ 10878 offset = (rownum % offset_frequency != 0) ? 0.0 : (brick_width * offset_amount); /* offset */ 10879 } 10880 10881 bricknum = floor_to_int((p.x + offset) / brick_width); 10882 10883 x = (p.x + offset) - brick_width * bricknum; 10884 y = p.y - row_height * rownum; 10885 10886 float tint = clamp((integer_noise((rownum << 16) + (bricknum & 0xFFFF)) + bias), 0.0, 1.0); 10887 10888 float min_dist = min(min(x, y), min(brick_width - x, row_height - y)); 10889 if (min_dist >= mortar_size) { 10890 return vec2(tint, 0.0); 10891 } 10892 else if (mortar_smooth == 0.0) { 10893 return vec2(tint, 1.0); 10894 } 10895 else { 10896 min_dist = 1.0 - min_dist / mortar_size; 10897 return vec2(tint, smoothstep(0.0, mortar_smooth, min_dist)); 10898 } 10899 } 10900 10901 void node_tex_brick(vec3 co, 10902 vec4 color1, 10903 vec4 color2, 10904 vec4 mortar, 10905 float scale, 10906 float mortar_size, 10907 float mortar_smooth, 10908 float bias, 10909 float brick_width, 10910 float row_height, 10911 float offset_amount, 10912 float offset_frequency, 10913 float squash_amount, 10914 float squash_frequency, 10915 out vec4 color, 10916 out float fac) 10917 { 10918 vec2 f2 = calc_brick_texture(co * scale, 10919 mortar_size, 10920 mortar_smooth, 10921 bias, 10922 brick_width, 10923 row_height, 10924 offset_amount, 10925 int(offset_frequency), 10926 squash_amount, 10927 int(squash_frequency)); 10928 float tint = f2.x; 10929 float f = f2.y; 10930 if (f != 1.0) { 10931 float facm = 1.0 - tint; 10932 color1 = facm * color1 + tint * color2; 10933 } 10934 color = mix(color1, mortar, f); 10935 fac = f; 10936 } 10937 10938 void node_tex_clouds(vec3 co, float size, out vec4 color, out float fac) 10939 { 10940 color = vec4(1.0); 10941 fac = 1.0; 10942 } 10943 10944 void node_tex_environment_equirectangular(vec3 co, float clamp_size, sampler2D ima, out vec3 uv) 10945 { 10946 vec3 nco = normalize(co); 10947 uv.x = -atan(nco.y, nco.x) / (2.0 * M_PI) + 0.5; 10948 uv.y = atan(nco.z, hypot(nco.x, nco.y)) / M_PI + 0.5; 10949 10950 /* Fix pole bleeding */ 10951 float half_height = clamp_size / float(textureSize(ima, 0).y); 10952 uv.y = clamp(uv.y, half_height, 1.0 - half_height); 10953 uv.z = 0.0; 10954 } 10955 10956 void node_tex_environment_mirror_ball(vec3 co, out vec3 uv) 10957 { 10958 vec3 nco = normalize(co); 10959 nco.y -= 1.0; 10960 10961 float div = 2.0 * sqrt(max(-0.5 * nco.y, 0.0)); 10962 nco /= max(1e-8, div); 10963 10964 uv = 0.5 * nco.xzz + 0.5; 10965 } 10966 10967 void node_tex_environment_empty(vec3 co, out vec4 color) 10968 { 10969 color = vec4(1.0, 0.0, 1.0, 1.0); 10970 } 10971 10972 /* 16bits floats limits. Higher/Lower values produce +/-inf. */ 10973 #define safe_color(a) (clamp(a, -65520.0, 65520.0)) 10974 10975 void node_tex_image_linear(vec3 co, sampler2D ima, out vec4 color, out float alpha) 10976 { 10977 color = safe_color(texture(ima, co.xy)); 10978 alpha = color.a; 10979 } 10980 10981 void node_tex_image_linear_no_mip(vec3 co, sampler2D ima, out vec4 color, out float alpha) 10982 { 10983 color = safe_color(textureLod(ima, co.xy, 0.0)); 10984 alpha = color.a; 10985 } 10986 10987 void node_tex_image_nearest(vec3 co, sampler2D ima, out vec4 color, out float alpha) 10988 { 10989 ivec2 pix = ivec2(fract(co.xy) * textureSize(ima, 0).xy); 10990 color = safe_color(texelFetch(ima, pix, 0)); 10991 alpha = color.a; 10992 } 10993 10994 /* @arg f: signed distance to texel center. */ 10995 void cubic_bspline_coefs(vec2 f, out vec2 w0, out vec2 w1, out vec2 w2, out vec2 w3) 10996 { 10997 vec2 f2 = f * f; 10998 vec2 f3 = f2 * f; 10999 /* Bspline coefs (optimized) */ 11000 w3 = f3 / 6.0; 11001 w0 = -w3 + f2 * 0.5 - f * 0.5 + 1.0 / 6.0; 11002 w1 = f3 * 0.5 - f2 * 1.0 + 2.0 / 3.0; 11003 w2 = 1.0 - w0 - w1 - w3; 11004 } 11005 11006 void node_tex_image_cubic_ex( 11007 vec3 co, sampler2D ima, float do_extend, out vec4 color, out float alpha) 11008 { 11009 vec2 tex_size = vec2(textureSize(ima, 0).xy); 11010 11011 co.xy *= tex_size; 11012 /* texel center */ 11013 vec2 tc = floor(co.xy - 0.5) + 0.5; 11014 vec2 w0, w1, w2, w3; 11015 cubic_bspline_coefs(co.xy - tc, w0, w1, w2, w3); 11016 11017 #if 1 /* Optimized version using 4 filtered tap. */ 11018 vec2 s0 = w0 + w1; 11019 vec2 s1 = w2 + w3; 11020 11021 vec2 f0 = w1 / (w0 + w1); 11022 vec2 f1 = w3 / (w2 + w3); 11023 11024 vec4 final_co; 11025 final_co.xy = tc - 1.0 + f0; 11026 final_co.zw = tc + 1.0 + f1; 11027 11028 if (do_extend == 1.0) { 11029 final_co = clamp(final_co, vec4(0.5), tex_size.xyxy - 0.5); 11030 } 11031 final_co /= tex_size.xyxy; 11032 11033 color = safe_color(textureLod(ima, final_co.xy, 0.0)) * s0.x * s0.y; 11034 color += safe_color(textureLod(ima, final_co.zy, 0.0)) * s1.x * s0.y; 11035 color += safe_color(textureLod(ima, final_co.xw, 0.0)) * s0.x * s1.y; 11036 color += safe_color(textureLod(ima, final_co.zw, 0.0)) * s1.x * s1.y; 11037 11038 #else /* Reference bruteforce 16 tap. */ 11039 color = texelFetch(ima, ivec2(tc + vec2(-1.0, -1.0)), 0) * w0.x * w0.y; 11040 color += texelFetch(ima, ivec2(tc + vec2(0.0, -1.0)), 0) * w1.x * w0.y; 11041 color += texelFetch(ima, ivec2(tc + vec2(1.0, -1.0)), 0) * w2.x * w0.y; 11042 color += texelFetch(ima, ivec2(tc + vec2(2.0, -1.0)), 0) * w3.x * w0.y; 11043 11044 color += texelFetch(ima, ivec2(tc + vec2(-1.0, 0.0)), 0) * w0.x * w1.y; 11045 color += texelFetch(ima, ivec2(tc + vec2(0.0, 0.0)), 0) * w1.x * w1.y; 11046 color += texelFetch(ima, ivec2(tc + vec2(1.0, 0.0)), 0) * w2.x * w1.y; 11047 color += texelFetch(ima, ivec2(tc + vec2(2.0, 0.0)), 0) * w3.x * w1.y; 11048 11049 color += texelFetch(ima, ivec2(tc + vec2(-1.0, 1.0)), 0) * w0.x * w2.y; 11050 color += texelFetch(ima, ivec2(tc + vec2(0.0, 1.0)), 0) * w1.x * w2.y; 11051 color += texelFetch(ima, ivec2(tc + vec2(1.0, 1.0)), 0) * w2.x * w2.y; 11052 color += texelFetch(ima, ivec2(tc + vec2(2.0, 1.0)), 0) * w3.x * w2.y; 11053 11054 color += texelFetch(ima, ivec2(tc + vec2(-1.0, 2.0)), 0) * w0.x * w3.y; 11055 color += texelFetch(ima, ivec2(tc + vec2(0.0, 2.0)), 0) * w1.x * w3.y; 11056 color += texelFetch(ima, ivec2(tc + vec2(1.0, 2.0)), 0) * w2.x * w3.y; 11057 color += texelFetch(ima, ivec2(tc + vec2(2.0, 2.0)), 0) * w3.x * w3.y; 11058 #endif 11059 11060 alpha = color.a; 11061 } 11062 11063 void node_tex_image_cubic(vec3 co, sampler2D ima, out vec4 color, out float alpha) 11064 { 11065 node_tex_image_cubic_ex(co, ima, 0.0, color, alpha); 11066 } 11067 11068 void node_tex_image_cubic_extend(vec3 co, sampler2D ima, out vec4 color, out float alpha) 11069 { 11070 node_tex_image_cubic_ex(co, ima, 1.0, color, alpha); 11071 } 11072 11073 void node_tex_image_smart(vec3 co, sampler2D ima, out vec4 color, out float alpha) 11074 { 11075 /* use cubic for now */ 11076 node_tex_image_cubic_ex(co, ima, 0.0, color, alpha); 11077 } 11078 11079 void tex_box_sample_linear( 11080 vec3 texco, vec3 N, sampler2D ima, out vec4 color1, out vec4 color2, out vec4 color3) 11081 { 11082 /* X projection */ 11083 vec2 uv = texco.yz; 11084 if (N.x < 0.0) { 11085 uv.x = 1.0 - uv.x; 11086 } 11087 color1 = texture(ima, uv); 11088 /* Y projection */ 11089 uv = texco.xz; 11090 if (N.y > 0.0) { 11091 uv.x = 1.0 - uv.x; 11092 } 11093 color2 = texture(ima, uv); 11094 /* Z projection */ 11095 uv = texco.yx; 11096 if (N.z > 0.0) { 11097 uv.x = 1.0 - uv.x; 11098 } 11099 color3 = texture(ima, uv); 11100 } 11101 11102 void tex_box_sample_nearest( 11103 vec3 texco, vec3 N, sampler2D ima, out vec4 color1, out vec4 color2, out vec4 color3) 11104 { 11105 /* X projection */ 11106 vec2 uv = texco.yz; 11107 if (N.x < 0.0) { 11108 uv.x = 1.0 - uv.x; 11109 } 11110 ivec2 pix = ivec2(uv.xy * textureSize(ima, 0).xy); 11111 color1 = texelFetch(ima, pix, 0); 11112 /* Y projection */ 11113 uv = texco.xz; 11114 if (N.y > 0.0) { 11115 uv.x = 1.0 - uv.x; 11116 } 11117 pix = ivec2(uv.xy * textureSize(ima, 0).xy); 11118 color2 = texelFetch(ima, pix, 0); 11119 /* Z projection */ 11120 uv = texco.yx; 11121 if (N.z > 0.0) { 11122 uv.x = 1.0 - uv.x; 11123 } 11124 pix = ivec2(uv.xy * textureSize(ima, 0).xy); 11125 color3 = texelFetch(ima, pix, 0); 11126 } 11127 11128 void tex_box_sample_cubic( 11129 vec3 texco, vec3 N, sampler2D ima, out vec4 color1, out vec4 color2, out vec4 color3) 11130 { 11131 float alpha; 11132 /* X projection */ 11133 vec2 uv = texco.yz; 11134 if (N.x < 0.0) { 11135 uv.x = 1.0 - uv.x; 11136 } 11137 node_tex_image_cubic_ex(uv.xyy, ima, 0.0, color1, alpha); 11138 /* Y projection */ 11139 uv = texco.xz; 11140 if (N.y > 0.0) { 11141 uv.x = 1.0 - uv.x; 11142 } 11143 node_tex_image_cubic_ex(uv.xyy, ima, 0.0, color2, alpha); 11144 /* Z projection */ 11145 uv = texco.yx; 11146 if (N.z > 0.0) { 11147 uv.x = 1.0 - uv.x; 11148 } 11149 node_tex_image_cubic_ex(uv.xyy, ima, 0.0, color3, alpha); 11150 } 11151 11152 void tex_box_sample_smart( 11153 vec3 texco, vec3 N, sampler2D ima, out vec4 color1, out vec4 color2, out vec4 color3) 11154 { 11155 tex_box_sample_cubic(texco, N, ima, color1, color2, color3); 11156 } 11157 11158 void node_tex_image_box(vec3 texco, 11159 vec3 N, 11160 vec4 color1, 11161 vec4 color2, 11162 vec4 color3, 11163 sampler2D ima, 11164 float blend, 11165 out vec4 color, 11166 out float alpha) 11167 { 11168 /* project from direction vector to barycentric coordinates in triangles */ 11169 N = abs(N); 11170 N /= dot(N, vec3(1.0)); 11171 11172 /* basic idea is to think of this as a triangle, each corner representing 11173 * one of the 3 faces of the cube. in the corners we have single textures, 11174 * in between we blend between two textures, and in the middle we a blend 11175 * between three textures. 11176 * 11177 * the Nxyz values are the barycentric coordinates in an equilateral 11178 * triangle, which in case of blending, in the middle has a smaller 11179 * equilateral triangle where 3 textures blend. this divides things into 11180 * 7 zones, with an if () test for each zone 11181 * EDIT: Now there is only 4 if's. */ 11182 11183 float limit = 0.5 + 0.5 * blend; 11184 11185 vec3 weight; 11186 weight = N.xyz / (N.xyx + N.yzz); 11187 weight = clamp((weight - 0.5 * (1.0 - blend)) / max(1e-8, blend), 0.0, 1.0); 11188 11189 /* test for mixes between two textures */ 11190 if (N.z < (1.0 - limit) * (N.y + N.x)) { 11191 weight.z = 0.0; 11192 weight.y = 1.0 - weight.x; 11193 } 11194 else if (N.x < (1.0 - limit) * (N.y + N.z)) { 11195 weight.x = 0.0; 11196 weight.z = 1.0 - weight.y; 11197 } 11198 else if (N.y < (1.0 - limit) * (N.x + N.z)) { 11199 weight.y = 0.0; 11200 weight.x = 1.0 - weight.z; 11201 } 11202 else { 11203 /* last case, we have a mix between three */ 11204 weight = ((2.0 - limit) * N + (limit - 1.0)) / max(1e-8, blend); 11205 } 11206 11207 color = weight.x * color1 + weight.y * color2 + weight.z * color3; 11208 alpha = color.a; 11209 } 11210 11211 void tex_clip_linear(vec3 co, sampler2D ima, vec4 icolor, out vec4 color, out float alpha) 11212 { 11213 vec2 tex_size = vec2(textureSize(ima, 0).xy); 11214 vec2 minco = min(co.xy, 1.0 - co.xy); 11215 minco = clamp(minco * tex_size + 0.5, 0.0, 1.0); 11216 float fac = minco.x * minco.y; 11217 11218 color = mix(vec4(0.0), icolor, fac); 11219 alpha = color.a; 11220 } 11221 11222 void tex_clip_nearest(vec3 co, sampler2D ima, vec4 icolor, out vec4 color, out float alpha) 11223 { 11224 vec4 minco = vec4(co.xy, 1.0 - co.xy); 11225 color = (any(lessThan(minco, vec4(0.0)))) ? vec4(0.0) : icolor; 11226 alpha = color.a; 11227 } 11228 11229 void tex_clip_cubic(vec3 co, sampler2D ima, vec4 icolor, out vec4 color, out float alpha) 11230 { 11231 vec2 tex_size = vec2(textureSize(ima, 0).xy); 11232 11233 co.xy *= tex_size; 11234 /* texel center */ 11235 vec2 tc = floor(co.xy - 0.5) + 0.5; 11236 vec2 w0, w1, w2, w3; 11237 cubic_bspline_coefs(co.xy - tc, w0, w1, w2, w3); 11238 11239 /* TODO Optimize this part. I'm sure there is a smarter way to do that. 11240 * Could do that when sampling? */ 11241 #define CLIP_CUBIC_SAMPLE(samp, size) \ 11242 (float(all(greaterThan(samp, vec2(-0.5)))) * float(all(lessThan(ivec2(samp), itex_size)))) 11243 ivec2 itex_size = textureSize(ima, 0).xy; 11244 float fac; 11245 fac = CLIP_CUBIC_SAMPLE(tc + vec2(-1.0, -1.0), itex_size) * w0.x * w0.y; 11246 fac += CLIP_CUBIC_SAMPLE(tc + vec2(0.0, -1.0), itex_size) * w1.x * w0.y; 11247 fac += CLIP_CUBIC_SAMPLE(tc + vec2(1.0, -1.0), itex_size) * w2.x * w0.y; 11248 fac += CLIP_CUBIC_SAMPLE(tc + vec2(2.0, -1.0), itex_size) * w3.x * w0.y; 11249 11250 fac += CLIP_CUBIC_SAMPLE(tc + vec2(-1.0, 0.0), itex_size) * w0.x * w1.y; 11251 fac += CLIP_CUBIC_SAMPLE(tc + vec2(0.0, 0.0), itex_size) * w1.x * w1.y; 11252 fac += CLIP_CUBIC_SAMPLE(tc + vec2(1.0, 0.0), itex_size) * w2.x * w1.y; 11253 fac += CLIP_CUBIC_SAMPLE(tc + vec2(2.0, 0.0), itex_size) * w3.x * w1.y; 11254 11255 fac += CLIP_CUBIC_SAMPLE(tc + vec2(-1.0, 1.0), itex_size) * w0.x * w2.y; 11256 fac += CLIP_CUBIC_SAMPLE(tc + vec2(0.0, 1.0), itex_size) * w1.x * w2.y; 11257 fac += CLIP_CUBIC_SAMPLE(tc + vec2(1.0, 1.0), itex_size) * w2.x * w2.y; 11258 fac += CLIP_CUBIC_SAMPLE(tc + vec2(2.0, 1.0), itex_size) * w3.x * w2.y; 11259 11260 fac += CLIP_CUBIC_SAMPLE(tc + vec2(-1.0, 2.0), itex_size) * w0.x * w3.y; 11261 fac += CLIP_CUBIC_SAMPLE(tc + vec2(0.0, 2.0), itex_size) * w1.x * w3.y; 11262 fac += CLIP_CUBIC_SAMPLE(tc + vec2(1.0, 2.0), itex_size) * w2.x * w3.y; 11263 fac += CLIP_CUBIC_SAMPLE(tc + vec2(2.0, 2.0), itex_size) * w3.x * w3.y; 11264 #undef CLIP_CUBIC_SAMPLE 11265 11266 color = mix(vec4(0.0), icolor, fac); 11267 alpha = color.a; 11268 } 11269 11270 void tex_clip_smart(vec3 co, sampler2D ima, vec4 icolor, out vec4 color, out float alpha) 11271 { 11272 tex_clip_cubic(co, ima, icolor, color, alpha); 11273 } 11274 11275 void node_tex_image_empty(vec3 co, out vec4 color, out float alpha) 11276 { 11277 color = vec4(0.0); 11278 alpha = 0.0; 11279 } 11280 11281 void node_tex_magic( 11282 vec3 co, float scale, float distortion, float depth, out vec4 color, out float fac) 11283 { 11284 vec3 p = co * scale; 11285 float x = sin((p.x + p.y + p.z) * 5.0); 11286 float y = cos((-p.x + p.y - p.z) * 5.0); 11287 float z = -cos((-p.x - p.y + p.z) * 5.0); 11288 11289 if (depth > 0) { 11290 x *= distortion; 11291 y *= distortion; 11292 z *= distortion; 11293 y = -cos(x - y + z); 11294 y *= distortion; 11295 if (depth > 1) { 11296 x = cos(x - y - z); 11297 x *= distortion; 11298 if (depth > 2) { 11299 z = sin(-x - y - z); 11300 z *= distortion; 11301 if (depth > 3) { 11302 x = -cos(-x + y - z); 11303 x *= distortion; 11304 if (depth > 4) { 11305 y = -sin(-x + y + z); 11306 y *= distortion; 11307 if (depth > 5) { 11308 y = -cos(-x + y + z); 11309 y *= distortion; 11310 if (depth > 6) { 11311 x = cos(x + y + z); 11312 x *= distortion; 11313 if (depth > 7) { 11314 z = sin(x + y - z); 11315 z *= distortion; 11316 if (depth > 8) { 11317 x = -cos(-x - y + z); 11318 x *= distortion; 11319 if (depth > 9) { 11320 y = -sin(x - y + z); 11321 y *= distortion; 11322 } 11323 } 11324 } 11325 } 11326 } 11327 } 11328 } 11329 } 11330 } 11331 } 11332 if (distortion != 0.0) { 11333 distortion *= 2.0; 11334 x /= distortion; 11335 y /= distortion; 11336 z /= distortion; 11337 } 11338 11339 color = vec4(0.5 - x, 0.5 - y, 0.5 - z, 1.0); 11340 fac = (color.x + color.y + color.z) / 3.0; 11341 } 11342 11343 float noise_fade(float t) 11344 { 11345 return t * t * t * (t * (t * 6.0 - 15.0) + 10.0); 11346 } 11347 11348 float noise_scale3(float result) 11349 { 11350 return 0.9820 * result; 11351 } 11352 11353 float noise_nerp(float t, float a, float b) 11354 { 11355 return (1.0 - t) * a + t * b; 11356 } 11357 11358 float noise_grad(uint hash, float x, float y, float z) 11359 { 11360 uint h = hash & 15u; 11361 float u = h < 8u ? x : y; 11362 float vt = ((h == 12u) || (h == 14u)) ? x : z; 11363 float v = h < 4u ? y : vt; 11364 return (((h & 1u) != 0u) ? -u : u) + (((h & 2u) != 0u) ? -v : v); 11365 } 11366 11367 float noise_perlin(float x, float y, float z) 11368 { 11369 int X; 11370 float fx = floorfrac(x, X); 11371 int Y; 11372 float fy = floorfrac(y, Y); 11373 int Z; 11374 float fz = floorfrac(z, Z); 11375 11376 float u = noise_fade(fx); 11377 float v = noise_fade(fy); 11378 float w = noise_fade(fz); 11379 11380 float noise_u[2], noise_v[2]; 11381 11382 noise_u[0] = noise_nerp( 11383 u, noise_grad(hash(X, Y, Z), fx, fy, fz), noise_grad(hash(X + 1, Y, Z), fx - 1.0, fy, fz)); 11384 11385 noise_u[1] = noise_nerp(u, 11386 noise_grad(hash(X, Y + 1, Z), fx, fy - 1.0, fz), 11387 noise_grad(hash(X + 1, Y + 1, Z), fx - 1.0, fy - 1.0, fz)); 11388 11389 noise_v[0] = noise_nerp(v, noise_u[0], noise_u[1]); 11390 11391 noise_u[0] = noise_nerp(u, 11392 noise_grad(hash(X, Y, Z + 1), fx, fy, fz - 1.0), 11393 noise_grad(hash(X + 1, Y, Z + 1), fx - 1.0, fy, fz - 1.0)); 11394 11395 noise_u[1] = noise_nerp(u, 11396 noise_grad(hash(X, Y + 1, Z + 1), fx, fy - 1.0, fz - 1.0), 11397 noise_grad(hash(X + 1, Y + 1, Z + 1), fx - 1.0, fy - 1.0, fz - 1.0)); 11398 11399 noise_v[1] = noise_nerp(v, noise_u[0], noise_u[1]); 11400 11401 return noise_scale3(noise_nerp(w, noise_v[0], noise_v[1])); 11402 } 11403 11404 float noise(vec3 p) 11405 { 11406 return 0.5 * noise_perlin(p.x, p.y, p.z) + 0.5; 11407 } 11408 11409 float snoise(vec3 p) 11410 { 11411 return noise_perlin(p.x, p.y, p.z); 11412 } 11413 11414 float noise_turbulence(vec3 p, float octaves, int hard) 11415 { 11416 float fscale = 1.0; 11417 float amp = 1.0; 11418 float sum = 0.0; 11419 octaves = clamp(octaves, 0.0, 16.0); 11420 int n = int(octaves); 11421 for (int i = 0; i <= n; i++) { 11422 float t = noise(fscale * p); 11423 if (hard != 0) { 11424 t = abs(2.0 * t - 1.0); 11425 } 11426 sum += t * amp; 11427 amp *= 0.5; 11428 fscale *= 2.0; 11429 } 11430 float rmd = octaves - floor(octaves); 11431 if (rmd != 0.0) { 11432 float t = noise(fscale * p); 11433 if (hard != 0) { 11434 t = abs(2.0 * t - 1.0); 11435 } 11436 float sum2 = sum + t * amp; 11437 sum *= (float(1 << n) / float((1 << (n + 1)) - 1)); 11438 sum2 *= (float(1 << (n + 1)) / float((1 << (n + 2)) - 1)); 11439 return (1.0 - rmd) * sum + rmd * sum2; 11440 } 11441 else { 11442 sum *= (float(1 << n) / float((1 << (n + 1)) - 1)); 11443 return sum; 11444 } 11445 } 11446 11447 void node_tex_noise( 11448 vec3 co, float scale, float detail, float distortion, out vec4 color, out float fac) 11449 { 11450 vec3 p = co * scale; 11451 int hard = 0; 11452 if (distortion != 0.0) { 11453 vec3 r, offset = vec3(13.5, 13.5, 13.5); 11454 r.x = noise(p + offset) * distortion; 11455 r.y = noise(p) * distortion; 11456 r.z = noise(p - offset) * distortion; 11457 p += r; 11458 } 11459 11460 fac = noise_turbulence(p, detail, hard); 11461 color = vec4(fac, 11462 noise_turbulence(vec3(p.y, p.x, p.z), detail, hard), 11463 noise_turbulence(vec3(p.y, p.z, p.x), detail, hard), 11464 1); 11465 } 11466 11467 /* Musgrave fBm 11468 * 11469 * H: fractal increment parameter 11470 * lacunarity: gap between successive frequencies 11471 * octaves: number of frequencies in the fBm 11472 * 11473 * from "Texturing and Modelling: A procedural approach" 11474 */ 11475 11476 float noise_musgrave_fBm(vec3 p, float H, float lacunarity, float octaves) 11477 { 11478 float rmd; 11479 float value = 0.0; 11480 float pwr = 1.0; 11481 float pwHL = pow(lacunarity, -H); 11482 11483 for (int i = 0; i < int(octaves); i++) { 11484 value += snoise(p) * pwr; 11485 pwr *= pwHL; 11486 p *= lacunarity; 11487 } 11488 11489 rmd = octaves - floor(octaves); 11490 if (rmd != 0.0) 11491 value += rmd * snoise(p) * pwr; 11492 11493 return value; 11494 } 11495 11496 /* Musgrave Multifractal 11497 * 11498 * H: highest fractal dimension 11499 * lacunarity: gap between successive frequencies 11500 * octaves: number of frequencies in the fBm 11501 */ 11502 11503 float noise_musgrave_multi_fractal(vec3 p, float H, float lacunarity, float octaves) 11504 { 11505 float rmd; 11506 float value = 1.0; 11507 float pwr = 1.0; 11508 float pwHL = pow(lacunarity, -H); 11509 11510 for (int i = 0; i < int(octaves); i++) { 11511 value *= (pwr * snoise(p) + 1.0); 11512 pwr *= pwHL; 11513 p *= lacunarity; 11514 } 11515 11516 rmd = octaves - floor(octaves); 11517 if (rmd != 0.0) 11518 value *= (rmd * pwr * snoise(p) + 1.0); /* correct? */ 11519 11520 return value; 11521 } 11522 11523 /* Musgrave Heterogeneous Terrain 11524 * 11525 * H: fractal dimension of the roughest area 11526 * lacunarity: gap between successive frequencies 11527 * octaves: number of frequencies in the fBm 11528 * offset: raises the terrain from `sea level' 11529 */ 11530 11531 float noise_musgrave_hetero_terrain(vec3 p, float H, float lacunarity, float octaves, float offset) 11532 { 11533 float value, increment, rmd; 11534 float pwHL = pow(lacunarity, -H); 11535 float pwr = pwHL; 11536 11537 /* first unscaled octave of function; later octaves are scaled */ 11538 value = offset + snoise(p); 11539 p *= lacunarity; 11540 11541 for (int i = 1; i < int(octaves); i++) { 11542 increment = (snoise(p) + offset) * pwr * value; 11543 value += increment; 11544 pwr *= pwHL; 11545 p *= lacunarity; 11546 } 11547 11548 rmd = octaves - floor(octaves); 11549 if (rmd != 0.0) { 11550 increment = (snoise(p) + offset) * pwr * value; 11551 value += rmd * increment; 11552 } 11553 11554 return value; 11555 } 11556 11557 /* Hybrid Additive/Multiplicative Multifractal Terrain 11558 * 11559 * H: fractal dimension of the roughest area 11560 * lacunarity: gap between successive frequencies 11561 * octaves: number of frequencies in the fBm 11562 * offset: raises the terrain from `sea level' 11563 */ 11564 11565 float noise_musgrave_hybrid_multi_fractal( 11566 vec3 p, float H, float lacunarity, float octaves, float offset, float gain) 11567 { 11568 float result, signal, weight, rmd; 11569 float pwHL = pow(lacunarity, -H); 11570 float pwr = pwHL; 11571 11572 result = snoise(p) + offset; 11573 weight = gain * result; 11574 p *= lacunarity; 11575 11576 for (int i = 1; (weight > 0.001f) && (i < int(octaves)); i++) { 11577 if (weight > 1.0) 11578 weight = 1.0; 11579 11580 signal = (snoise(p) + offset) * pwr; 11581 pwr *= pwHL; 11582 result += weight * signal; 11583 weight *= gain * signal; 11584 p *= lacunarity; 11585 } 11586 11587 rmd = octaves - floor(octaves); 11588 if (rmd != 0.0) 11589 result += rmd * ((snoise(p) + offset) * pwr); 11590 11591 return result; 11592 } 11593 11594 /* Ridged Multifractal Terrain 11595 * 11596 * H: fractal dimension of the roughest area 11597 * lacunarity: gap between successive frequencies 11598 * octaves: number of frequencies in the fBm 11599 * offset: raises the terrain from `sea level' 11600 */ 11601 11602 float noise_musgrave_ridged_multi_fractal( 11603 vec3 p, float H, float lacunarity, float octaves, float offset, float gain) 11604 { 11605 float result, signal, weight; 11606 float pwHL = pow(lacunarity, -H); 11607 float pwr = pwHL; 11608 11609 signal = offset - abs(snoise(p)); 11610 signal *= signal; 11611 result = signal; 11612 weight = 1.0; 11613 11614 for (int i = 1; i < int(octaves); i++) { 11615 p *= lacunarity; 11616 weight = clamp(signal * gain, 0.0, 1.0); 11617 signal = offset - abs(snoise(p)); 11618 signal *= signal; 11619 signal *= weight; 11620 result += signal * pwr; 11621 pwr *= pwHL; 11622 } 11623 11624 return result; 11625 } 11626 11627 float svm_musgrave(int type, 11628 float dimension, 11629 float lacunarity, 11630 float octaves, 11631 float offset, 11632 float intensity, 11633 float gain, 11634 vec3 p) 11635 { 11636 if (type == 0 /* NODE_MUSGRAVE_MULTIFRACTAL */) 11637 return intensity * noise_musgrave_multi_fractal(p, dimension, lacunarity, octaves); 11638 else if (type == 1 /* NODE_MUSGRAVE_FBM */) 11639 return intensity * noise_musgrave_fBm(p, dimension, lacunarity, octaves); 11640 else if (type == 2 /* NODE_MUSGRAVE_HYBRID_MULTIFRACTAL */) 11641 return intensity * 11642 noise_musgrave_hybrid_multi_fractal(p, dimension, lacunarity, octaves, offset, gain); 11643 else if (type == 3 /* NODE_MUSGRAVE_RIDGED_MULTIFRACTAL */) 11644 return intensity * 11645 noise_musgrave_ridged_multi_fractal(p, dimension, lacunarity, octaves, offset, gain); 11646 else if (type == 4 /* NODE_MUSGRAVE_HETERO_TERRAIN */) 11647 return intensity * noise_musgrave_hetero_terrain(p, dimension, lacunarity, octaves, offset); 11648 return 0.0; 11649 } 11650 11651 void node_tex_musgrave(vec3 co, 11652 float scale, 11653 float detail, 11654 float dimension, 11655 float lacunarity, 11656 float offset, 11657 float gain, 11658 float type, 11659 out vec4 color, 11660 out float fac) 11661 { 11662 fac = svm_musgrave(int(type), dimension, lacunarity, detail, offset, 1.0, gain, co *scale); 11663 11664 color = vec4(fac, fac, fac, 1.0); 11665 } 11666 11667 void node_tex_sky(vec3 co, out vec4 color) 11668 { 11669 color = vec4(1.0); 11670 } 11671 11672 void node_tex_voronoi(vec3 co, 11673 float scale, 11674 float exponent, 11675 float coloring, 11676 float metric, 11677 float feature, 11678 out vec4 color, 11679 out float fac) 11680 { 11681 vec3 p = co * scale; 11682 int xx, yy, zz, xi, yi, zi; 11683 vec4 da = vec4(1e10); 11684 vec3 pa[4] = vec3[4](vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0)); 11685 11686 xi = floor_to_int(p[0]); 11687 yi = floor_to_int(p[1]); 11688 zi = floor_to_int(p[2]); 11689 11690 for (xx = xi - 1; xx <= xi + 1; xx++) { 11691 for (yy = yi - 1; yy <= yi + 1; yy++) { 11692 for (zz = zi - 1; zz <= zi + 1; zz++) { 11693 vec3 ip = vec3(xx, yy, zz); 11694 vec3 vp = cellnoise_color(ip); 11695 vec3 pd = p - (vp + ip); 11696 11697 float d = 0.0; 11698 if (metric == 0.0) { /* SHD_VORONOI_DISTANCE 0 */ 11699 d = dot(pd, pd); 11700 } 11701 else if (metric == 1.0) { /* SHD_VORONOI_MANHATTAN 1 */ 11702 d = abs(pd[0]) + abs(pd[1]) + abs(pd[2]); 11703 } 11704 else if (metric == 2.0) { /* SHD_VORONOI_CHEBYCHEV 2 */ 11705 d = max(abs(pd[0]), max(abs(pd[1]), abs(pd[2]))); 11706 } 11707 else if (metric == 3.0) { /* SHD_VORONOI_MINKOWSKI 3 */ 11708 d = pow(pow(abs(pd[0]), exponent) + pow(abs(pd[1]), exponent) + 11709 pow(abs(pd[2]), exponent), 11710 1.0 / exponent); 11711 } 11712 11713 vp += vec3(xx, yy, zz); 11714 if (d < da[0]) { 11715 da.yzw = da.xyz; 11716 da[0] = d; 11717 11718 pa[3] = pa[2]; 11719 pa[2] = pa[1]; 11720 pa[1] = pa[0]; 11721 pa[0] = vp; 11722 } 11723 else if (d < da[1]) { 11724 da.zw = da.yz; 11725 da[1] = d; 11726 11727 pa[3] = pa[2]; 11728 pa[2] = pa[1]; 11729 pa[1] = vp; 11730 } 11731 else if (d < da[2]) { 11732 da[3] = da[2]; 11733 da[2] = d; 11734 11735 pa[3] = pa[2]; 11736 pa[2] = vp; 11737 } 11738 else if (d < da[3]) { 11739 da[3] = d; 11740 pa[3] = vp; 11741 } 11742 } 11743 } 11744 } 11745 11746 if (coloring == 0.0) { 11747 /* Intensity output */ 11748 if (feature == 0.0) { /* F1 */ 11749 fac = abs(da[0]); 11750 } 11751 else if (feature == 1.0) { /* F2 */ 11752 fac = abs(da[1]); 11753 } 11754 else if (feature == 2.0) { /* F3 */ 11755 fac = abs(da[2]); 11756 } 11757 else if (feature == 3.0) { /* F4 */ 11758 fac = abs(da[3]); 11759 } 11760 else if (feature == 4.0) { /* F2F1 */ 11761 fac = abs(da[1] - da[0]); 11762 } 11763 color = vec4(fac, fac, fac, 1.0); 11764 } 11765 else { 11766 /* Color output */ 11767 vec3 col = vec3(fac, fac, fac); 11768 if (feature == 0.0) { /* F1 */ 11769 col = pa[0]; 11770 } 11771 else if (feature == 1.0) { /* F2 */ 11772 col = pa[1]; 11773 } 11774 else if (feature == 2.0) { /* F3 */ 11775 col = pa[2]; 11776 } 11777 else if (feature == 3.0) { /* F4 */ 11778 col = pa[3]; 11779 } 11780 else if (feature == 4.0) { /* F2F1 */ 11781 col = abs(pa[1] - pa[0]); 11782 } 11783 11784 color = vec4(cellnoise_color(col), 1.0); 11785 fac = (color.x + color.y + color.z) * (1.0 / 3.0); 11786 } 11787 } 11788 11789 float calc_wave( 11790 vec3 p, float distortion, float detail, float detail_scale, int wave_type, int wave_profile) 11791 { 11792 float n; 11793 11794 if (wave_type == 0) /* type bands */ 11795 n = (p.x + p.y + p.z) * 10.0; 11796 else /* type rings */ 11797 n = length(p) * 20.0; 11798 11799 if (distortion != 0.0) 11800 n += distortion * noise_turbulence(p * detail_scale, detail, 0); 11801 11802 if (wave_profile == 0) { /* profile sin */ 11803 return 0.5 + 0.5 * sin(n); 11804 } 11805 else { /* profile saw */ 11806 n /= 2.0 * M_PI; 11807 n -= int(n); 11808 return (n < 0.0) ? n + 1.0 : n; 11809 } 11810 } 11811 11812 void node_tex_wave(vec3 co, 11813 float scale, 11814 float distortion, 11815 float detail, 11816 float detail_scale, 11817 float wave_type, 11818 float wave_profile, 11819 out vec4 color, 11820 out float fac) 11821 { 11822 float f; 11823 f = calc_wave(co * scale, distortion, detail, detail_scale, int(wave_type), int(wave_profile)); 11824 11825 color = vec4(f, f, f, 1.0); 11826 fac = f; 11827 } 11828 11829 /* light path */ 11830 11831 void node_light_path(out float is_camera_ray, 11832 out float is_shadow_ray, 11833 out float is_diffuse_ray, 11834 out float is_glossy_ray, 11835 out float is_singular_ray, 11836 out float is_reflection_ray, 11837 out float is_transmission_ray, 11838 out float ray_length, 11839 out float ray_depth, 11840 out float diffuse_depth, 11841 out float glossy_depth, 11842 out float transparent_depth, 11843 out float transmission_depth) 11844 { 11845 /* Supported. */ 11846 is_camera_ray = (rayType == EEVEE_RAY_CAMERA) ? 1.0 : 0.0; 11847 is_shadow_ray = (rayType == EEVEE_RAY_SHADOW) ? 1.0 : 0.0; 11848 is_diffuse_ray = (rayType == EEVEE_RAY_DIFFUSE) ? 1.0 : 0.0; 11849 is_glossy_ray = (rayType == EEVEE_RAY_GLOSSY) ? 1.0 : 0.0; 11850 /* Kind of supported. */ 11851 is_singular_ray = is_glossy_ray; 11852 is_reflection_ray = is_glossy_ray; 11853 is_transmission_ray = is_glossy_ray; 11854 ray_depth = rayDepth; 11855 diffuse_depth = (is_diffuse_ray == 1.0) ? rayDepth : 0.0; 11856 glossy_depth = (is_glossy_ray == 1.0) ? rayDepth : 0.0; 11857 transmission_depth = (is_transmission_ray == 1.0) ? glossy_depth : 0.0; 11858 /* Not supported. */ 11859 ray_length = 1.0; 11860 transparent_depth = 0.0; 11861 } 11862 11863 void node_light_falloff( 11864 float strength, float tsmooth, out float quadratic, out float linear, out float constant) 11865 { 11866 quadratic = strength; 11867 linear = strength; 11868 constant = strength; 11869 } 11870 11871 void node_object_info(mat4 obmat, 11872 vec4 info, 11873 out vec3 location, 11874 out float object_index, 11875 out float material_index, 11876 out float random) 11877 { 11878 location = obmat[3].xyz; 11879 object_index = info.x; 11880 material_index = info.y; 11881 random = info.z; 11882 } 11883 11884 void node_normal_map(vec4 info, vec4 tangent, vec3 normal, vec3 texnormal, out vec3 outnormal) 11885 { 11886 if (all(equal(tangent, vec4(0.0, 0.0, 0.0, 1.0)))) { 11887 outnormal = normal; 11888 return; 11889 } 11890 tangent *= (gl_FrontFacing ? 1.0 : -1.0); 11891 vec3 B = tangent.w * cross(normal, tangent.xyz) * info.w; 11892 11893 outnormal = texnormal.x * tangent.xyz + texnormal.y * B + texnormal.z * normal; 11894 outnormal = normalize(outnormal); 11895 } 11896 11897 void node_bump( 11898 float strength, float dist, float height, vec3 N, vec3 surf_pos, float invert, out vec3 result) 11899 { 11900 N = mat3(ViewMatrix) * normalize(N); 11901 dist *= invert; 11902 11903 vec3 dPdx = dFdx(surf_pos); 11904 vec3 dPdy = dFdy(surf_pos); 11905 11906 /* Get surface tangents from normal. */ 11907 vec3 Rx = cross(dPdy, N); 11908 vec3 Ry = cross(N, dPdx); 11909 11910 /* Compute surface gradient and determinant. */ 11911 float det = dot(dPdx, Rx); 11912 11913 float dHdx = dFdx(height); 11914 float dHdy = dFdy(height); 11915 vec3 surfgrad = dHdx * Rx + dHdy * Ry; 11916 11917 strength = max(strength, 0.0); 11918 11919 result = normalize(abs(det) * N - dist * sign(det) * surfgrad); 11920 result = normalize(mix(N, result, strength)); 11921 11922 result = mat3(ViewMatrixInverse) * result; 11923 } 11924 11925 void node_bevel(float radius, vec3 N, out vec3 result) 11926 { 11927 result = N; 11928 } 11929 11930 void node_hair_info(out float is_strand, 11931 out float intercept, 11932 out float thickness, 11933 out vec3 tangent, 11934 out float random) 11935 { 11936 #ifdef HAIR_SHADER 11937 is_strand = 1.0; 11938 intercept = hairTime; 11939 thickness = hairThickness; 11940 tangent = normalize(hairTangent); 11941 random = wang_hash_noise( 11942 uint(hairStrandID)); /* TODO: could be precomputed per strand instead. */ 11943 #else 11944 is_strand = 0.0; 11945 intercept = 0.0; 11946 thickness = 0.0; 11947 tangent = vec3(1.0); 11948 random = 0.0; 11949 #endif 11950 } 11951 11952 void node_displacement_object( 11953 float height, float midlevel, float scale, vec3 N, mat4 obmat, out vec3 result) 11954 { 11955 N = (vec4(N, 0.0) * obmat).xyz; 11956 result = (height - midlevel) * scale * normalize(N); 11957 result = (obmat * vec4(result, 0.0)).xyz; 11958 } 11959 11960 void node_displacement_world(float height, float midlevel, float scale, vec3 N, out vec3 result) 11961 { 11962 result = (height - midlevel) * scale * normalize(N); 11963 } 11964 11965 void node_vector_displacement_tangent(vec4 vector, 11966 float midlevel, 11967 float scale, 11968 vec4 tangent, 11969 vec3 normal, 11970 mat4 obmat, 11971 mat4 viewmat, 11972 out vec3 result) 11973 { 11974 vec3 N_object = normalize(((vec4(normal, 0.0) * viewmat) * obmat).xyz); 11975 vec3 T_object = normalize(((vec4(tangent.xyz, 0.0) * viewmat) * obmat).xyz); 11976 vec3 B_object = tangent.w * normalize(cross(N_object, T_object)); 11977 11978 vec3 offset = (vector.xyz - vec3(midlevel)) * scale; 11979 result = offset.x * T_object + offset.y * N_object + offset.z * B_object; 11980 result = (obmat * vec4(result, 0.0)).xyz; 11981 } 11982 11983 void node_vector_displacement_object( 11984 vec4 vector, float midlevel, float scale, mat4 obmat, out vec3 result) 11985 { 11986 result = (vector.xyz - vec3(midlevel)) * scale; 11987 result = (obmat * vec4(result, 0.0)).xyz; 11988 } 11989 11990 void node_vector_displacement_world(vec4 vector, float midlevel, float scale, out vec3 result) 11991 { 11992 result = (vector.xyz - vec3(midlevel)) * scale; 11993 } 11994 11995 /* output */ 11996 11997 void node_output_material(Closure surface, Closure volume, vec3 displacement, out Closure result) 11998 { 11999 #ifdef VOLUMETRICS 12000 result = volume; 12001 #else 12002 result = surface; 12003 #endif 12004 } 12005 12006 uniform float backgroundAlpha; 12007 12008 void node_output_world(Closure surface, Closure volume, out Closure result) 12009 { 12010 #ifndef VOLUMETRICS 12011 result.radiance = surface.radiance * backgroundAlpha; 12012 result.opacity = backgroundAlpha; 12013 #else 12014 result = volume; 12015 #endif /* VOLUMETRICS */ 12016 } 12017 12018 #ifndef VOLUMETRICS 12019 /* TODO : clean this ifdef mess */ 12020 /* EEVEE output */ 12021 void world_normals_get(out vec3 N) 12022 { 12023 # ifdef HAIR_SHADER 12024 vec3 B = normalize(cross(worldNormal, hairTangent)); 12025 float cos_theta; 12026 if (hairThicknessRes == 1) { 12027 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 12028 /* Random cosine normal distribution on the hair surface. */ 12029 cos_theta = rand.x * 2.0 - 1.0; 12030 } 12031 else { 12032 /* Shade as a cylinder. */ 12033 cos_theta = hairThickTime / hairThickness; 12034 } 12035 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta)); 12036 N = normalize(worldNormal * sin_theta + B * cos_theta); 12037 # else 12038 N = gl_FrontFacing ? worldNormal : -worldNormal; 12039 # endif 12040 } 12041 12042 void node_eevee_specular(vec4 diffuse, 12043 vec4 specular, 12044 float roughness, 12045 vec4 emissive, 12046 float transp, 12047 vec3 normal, 12048 float clearcoat, 12049 float clearcoat_roughness, 12050 vec3 clearcoat_normal, 12051 float occlusion, 12052 float ssr_id, 12053 out Closure result) 12054 { 12055 vec3 out_diff, out_spec, ssr_spec; 12056 eevee_closure_default(normal, 12057 diffuse.rgb, 12058 specular.rgb, 12059 int(ssr_id), 12060 roughness, 12061 occlusion, 12062 out_diff, 12063 out_spec, 12064 ssr_spec); 12065 12066 vec3 vN = normalize(mat3(ViewMatrix) * normal); 12067 result = CLOSURE_DEFAULT; 12068 result.radiance = out_diff * diffuse.rgb + out_spec + emissive.rgb; 12069 result.opacity = 1.0 - transp; 12070 result.ssr_data = vec4(ssr_spec, roughness); 12071 result.ssr_normal = normal_encode(vN, viewCameraVec); 12072 result.ssr_id = int(ssr_id); 12073 } 12074 12075 void node_shader_to_rgba(Closure cl, out vec4 outcol, out float outalpha) 12076 { 12077 vec4 spec_accum = vec4(0.0); 12078 if (ssrToggle && cl.ssr_id == outputSsrId) { 12079 vec3 V = cameraVec; 12080 vec3 vN = normal_decode(cl.ssr_normal, viewCameraVec); 12081 vec3 N = transform_direction(ViewMatrixInverse, vN); 12082 float roughness = cl.ssr_data.a; 12083 float roughnessSquared = max(1e-3, roughness * roughness); 12084 fallback_cubemap(N, V, worldPosition, viewPosition, roughness, roughnessSquared, spec_accum); 12085 } 12086 12087 outalpha = cl.opacity; 12088 outcol = vec4((spec_accum.rgb * cl.ssr_data.rgb) + cl.radiance, 1.0); 12089 12090 # ifdef USE_SSS 12091 # ifdef USE_SSS_ALBEDO 12092 outcol.rgb += cl.sss_data.rgb * cl.sss_albedo; 12093 # else 12094 outcol.rgb += cl.sss_data.rgb; 12095 # endif 12096 # endif 12097 } 12098 12099 #endif /* VOLUMETRICS */ 12100 Closure strct5 = CLOSURE_DEFAULT; 12101 12102 layout (std140) uniform nodeTree { 12103 vec4 unf1; 12104 float unf2; 12105 }; 12106 12107 Closure nodetree_exec(void) 12108 { 12109 Closure tmp3; 12110 Closure tmp6; 12111 12112 node_background(unf1, unf2, tmp3); 12113 node_output_world(tmp3, strct5, tmp6); 12114 12115 return tmp6; 12116 } 12117 #ifndef NODETREE_EXEC 12118 out vec4 fragColor; 12119 void main() 12120 { 12121 Closure cl = nodetree_exec(); 12122 fragColor = vec4(cl.radiance, cl.opacity); 12123 } 12124 #endif 12125 0(973) : error C0105: Syntax error in #if 0(973) : error C0105: Syntax error in #if 0(974) : error C0000: syntax error, unexpected '!' at token "!" GPUShader: compile error: ===== shader string 1 ==== 1 #version 330 ===== shader string 2 ==== 2 #define GPU_FRAGMENT_SHADER ===== shader string 3 ==== 3 #extension GL_ARB_texture_gather: enable 4 #define GPU_ARB_texture_gather 5 #extension GL_ARB_texture_query_lod: enable ===== shader string 4 ==== 6 #define GPU_NVIDIA 7 #define OS_WIN ===== shader string 5 ==== 8 #define EEVEE_ENGINE 9 #define MAX_PROBE 128 10 #define MAX_GRID 64 11 #define MAX_PLANAR 16 12 #define MAX_LIGHT 128 13 #define MAX_SHADOW 256 14 #define MAX_SHADOW_CUBE (256 - 4 * 8) 15 #define MAX_SHADOW_CASCADE 8 16 #define MAX_CASCADE_NUM 4 17 #define IRRADIANCE_HL2 18 #define WORLD_BACKGROUND ===== shader string 6 ==== 19 /* keep in sync with DRWManager.view_data */ 20 layout(std140) uniform viewBlock 21 { 22 /* Same order as DRWViewportMatrixType */ 23 mat4 ViewProjectionMatrix; 24 mat4 ViewProjectionMatrixInverse; 25 mat4 ViewMatrix; 26 mat4 ViewMatrixInverse; 27 mat4 ProjectionMatrix; 28 mat4 ProjectionMatrixInverse; 29 30 vec4 CameraTexCoFactors; 31 32 vec4 clipPlanes[2]; 33 }; 34 35 layout(std140) uniform common_block 36 { 37 mat4 pastViewProjectionMatrix; 38 vec4 viewVecs[2]; 39 vec2 mipRatio[10]; /* To correct mip level texel mis-alignement */ 40 /* Ambient Occlusion */ 41 vec4 aoParameters[2]; 42 /* Volumetric */ 43 ivec4 volTexSize; 44 vec4 volDepthParameters; /* Parameters to the volume Z equation */ 45 vec4 volInvTexSize; 46 vec4 volJitter; 47 vec4 volCoordScale; /* To convert volume uvs to screen uvs */ 48 float volHistoryAlpha; 49 float volLightClamp; 50 float volShadowSteps; 51 bool volUseLights; 52 /* Screen Space Reflections */ 53 vec4 ssrParameters; 54 float ssrBorderFac; 55 float ssrMaxRoughness; 56 float ssrFireflyFac; 57 float ssrBrdfBias; 58 bool ssrToggle; 59 /* SubSurface Scattering */ 60 float sssJitterThreshold; 61 bool sssToggle; 62 /* Specular */ 63 bool specToggle; 64 /* Lights */ 65 int laNumLight; 66 /* Probes */ 67 int prbNumPlanar; 68 int prbNumRenderCube; 69 int prbNumRenderGrid; 70 int prbIrradianceVisSize; 71 float prbIrradianceSmooth; 72 float prbLodCubeMax; 73 float prbLodPlanarMax; 74 /* Misc*/ 75 int hizMipOffset; 76 int rayType; 77 float rayDepth; 78 }; 79 80 /* rayType (keep in sync with ray_type) */ 81 #define EEVEE_RAY_CAMERA 0 82 #define EEVEE_RAY_SHADOW 1 83 #define EEVEE_RAY_DIFFUSE 2 84 #define EEVEE_RAY_GLOSSY 3 85 86 /* aoParameters */ 87 #define aoDistance aoParameters[0].x 88 #define aoSamples aoParameters[0].y /* UNUSED */ 89 #define aoFactor aoParameters[0].z 90 #define aoInvSamples aoParameters[0].w /* UNUSED */ 91 92 #define aoOffset aoParameters[1].x /* UNUSED */ 93 #define aoBounceFac aoParameters[1].y 94 #define aoQuality aoParameters[1].z 95 #define aoSettings aoParameters[1].w 96 97 /* ssrParameters */ 98 #define ssrQuality ssrParameters.x 99 #define ssrThickness ssrParameters.y 100 #define ssrPixelSize ssrParameters.zw 101 102 #define M_PI 3.14159265358979323846 /* pi */ 103 #define M_2PI 6.28318530717958647692 /* 2*pi */ 104 #define M_PI_2 1.57079632679489661923 /* pi/2 */ 105 #define M_1_PI 0.318309886183790671538 /* 1/pi */ 106 #define M_1_2PI 0.159154943091895335768 /* 1/(2*pi) */ 107 #define M_1_PI2 0.101321183642337771443 /* 1/(pi^2) */ 108 109 #define LUT_SIZE 64 110 111 /* Buffers */ 112 uniform sampler2D colorBuffer; 113 uniform sampler2D depthBuffer; 114 uniform sampler2D maxzBuffer; 115 uniform sampler2D minzBuffer; 116 uniform sampler2DArray planarDepth; 117 118 #define cameraForward normalize(ViewMatrixInverse[2].xyz) 119 #define cameraPos ViewMatrixInverse[3].xyz 120 #define cameraVec \ 121 ((ProjectionMatrix[3][3] == 0.0) ? normalize(cameraPos - worldPosition) : cameraForward) 122 #define viewCameraVec \ 123 ((ProjectionMatrix[3][3] == 0.0) ? normalize(-viewPosition) : vec3(0.0, 0.0, 1.0)) 124 125 /* ------- Structures -------- */ 126 127 /* ------ Lights ----- */ 128 struct LightData { 129 vec4 position_influence; /* w : InfluenceRadius (inversed and squared) */ 130 vec4 color_spec; /* w : Spec Intensity */ 131 vec4 spotdata_radius_shadow; /* x : spot size, y : spot blend, z : radius, w: shadow id */ 132 vec4 rightvec_sizex; /* xyz: Normalized up vector, w: area size X or spot scale X */ 133 vec4 upvec_sizey; /* xyz: Normalized right vector, w: area size Y or spot scale Y */ 134 vec4 forwardvec_type; /* xyz: Normalized forward vector, w: Light Type */ 135 }; 136 137 /* convenience aliases */ 138 #define l_color color_spec.rgb 139 #define l_spec color_spec.a 140 #define l_position position_influence.xyz 141 #define l_influence position_influence.w 142 #define l_sizex rightvec_sizex.w 143 #define l_sizey upvec_sizey.w 144 #define l_right rightvec_sizex.xyz 145 #define l_up upvec_sizey.xyz 146 #define l_forward forwardvec_type.xyz 147 #define l_type forwardvec_type.w 148 #define l_spot_size spotdata_radius_shadow.x 149 #define l_spot_blend spotdata_radius_shadow.y 150 #define l_radius spotdata_radius_shadow.z 151 #define l_shadowid spotdata_radius_shadow.w 152 153 /* ------ Shadows ----- */ 154 #ifndef MAX_CASCADE_NUM 155 # define MAX_CASCADE_NUM 4 156 #endif 157 158 struct ShadowData { 159 vec4 near_far_bias_exp; 160 vec4 shadow_data_start_end; 161 vec4 contact_shadow_data; 162 }; 163 164 struct ShadowCubeData { 165 vec4 position; 166 }; 167 168 struct ShadowCascadeData { 169 mat4 shadowmat[MAX_CASCADE_NUM]; 170 vec4 split_start_distances; 171 vec4 split_end_distances; 172 }; 173 174 /* convenience aliases */ 175 #define sh_near near_far_bias_exp.x 176 #define sh_far near_far_bias_exp.y 177 #define sh_bias near_far_bias_exp.z 178 #define sh_exp near_far_bias_exp.w 179 #define sh_bleed near_far_bias_exp.w 180 #define sh_tex_start shadow_data_start_end.x 181 #define sh_data_start shadow_data_start_end.y 182 #define sh_multi_nbr shadow_data_start_end.z 183 #define sh_blur shadow_data_start_end.w 184 #define sh_contact_dist contact_shadow_data.x 185 #define sh_contact_offset contact_shadow_data.y 186 #define sh_contact_spread contact_shadow_data.z 187 #define sh_contact_thickness contact_shadow_data.w 188 189 /* ------- Convenience functions --------- */ 190 191 vec3 mul(mat3 m, vec3 v) 192 { 193 return m * v; 194 } 195 mat3 mul(mat3 m1, mat3 m2) 196 { 197 return m1 * m2; 198 } 199 vec3 transform_direction(mat4 m, vec3 v) 200 { 201 return mat3(m) * v; 202 } 203 vec3 transform_point(mat4 m, vec3 v) 204 { 205 return (m * vec4(v, 1.0)).xyz; 206 } 207 vec3 project_point(mat4 m, vec3 v) 208 { 209 vec4 tmp = m * vec4(v, 1.0); 210 return tmp.xyz / tmp.w; 211 } 212 213 #define min3(a, b, c) min(a, min(b, c)) 214 #define min4(a, b, c, d) min(a, min3(b, c, d)) 215 #define min5(a, b, c, d, e) min(a, min4(b, c, d, e)) 216 #define min6(a, b, c, d, e, f) min(a, min5(b, c, d, e, f)) 217 #define min7(a, b, c, d, e, f, g) min(a, min6(b, c, d, e, f, g)) 218 #define min8(a, b, c, d, e, f, g, h) min(a, min7(b, c, d, e, f, g, h)) 219 #define min9(a, b, c, d, e, f, g, h, i) min(a, min8(b, c, d, e, f, g, h, i)) 220 221 #define max3(a, b, c) max(a, max(b, c)) 222 #define max4(a, b, c, d) max(a, max3(b, c, d)) 223 #define max5(a, b, c, d, e) max(a, max4(b, c, d, e)) 224 #define max6(a, b, c, d, e, f) max(a, max5(b, c, d, e, f)) 225 #define max7(a, b, c, d, e, f, g) max(a, max6(b, c, d, e, f, g)) 226 #define max8(a, b, c, d, e, f, g, h) max(a, max7(b, c, d, e, f, g, h)) 227 #define max9(a, b, c, d, e, f, g, h, i) max(a, max8(b, c, d, e, f, g, h, i)) 228 229 #define avg3(a, b, c) (a + b + c) * (1.0 / 3.0) 230 #define avg4(a, b, c, d) (a + b + c + d) * (1.0 / 4.0) 231 #define avg5(a, b, c, d, e) (a + b + c + d + e) * (1.0 / 5.0) 232 #define avg6(a, b, c, d, e, f) (a + b + c + d + e + f) * (1.0 / 6.0) 233 #define avg7(a, b, c, d, e, f, g) (a + b + c + d + e + f + g) * (1.0 / 7.0) 234 #define avg8(a, b, c, d, e, f, g, h) (a + b + c + d + e + f + g + h) * (1.0 / 8.0) 235 #define avg9(a, b, c, d, e, f, g, h, i) (a + b + c + d + e + f + g + h + i) * (1.0 / 9.0) 236 237 float min_v2(vec2 v) 238 { 239 return min(v.x, v.y); 240 } 241 float min_v3(vec3 v) 242 { 243 return min(v.x, min(v.y, v.z)); 244 } 245 float max_v2(vec2 v) 246 { 247 return max(v.x, v.y); 248 } 249 float max_v3(vec3 v) 250 { 251 return max(v.x, max(v.y, v.z)); 252 } 253 254 float sum(vec2 v) 255 { 256 return dot(vec2(1.0), v); 257 } 258 float sum(vec3 v) 259 { 260 return dot(vec3(1.0), v); 261 } 262 float sum(vec4 v) 263 { 264 return dot(vec4(1.0), v); 265 } 266 267 float saturate(float a) 268 { 269 return clamp(a, 0.0, 1.0); 270 } 271 vec2 saturate(vec2 a) 272 { 273 return clamp(a, 0.0, 1.0); 274 } 275 vec3 saturate(vec3 a) 276 { 277 return clamp(a, 0.0, 1.0); 278 } 279 vec4 saturate(vec4 a) 280 { 281 return clamp(a, 0.0, 1.0); 282 } 283 284 float distance_squared(vec2 a, vec2 b) 285 { 286 a -= b; 287 return dot(a, a); 288 } 289 float distance_squared(vec3 a, vec3 b) 290 { 291 a -= b; 292 return dot(a, a); 293 } 294 float len_squared(vec3 a) 295 { 296 return dot(a, a); 297 } 298 299 float inverse_distance(vec3 V) 300 { 301 return max(1 / length(V), 1e-8); 302 } 303 304 vec2 mip_ratio_interp(float mip) 305 { 306 float low_mip = floor(mip); 307 return mix(mipRatio[int(low_mip)], mipRatio[int(low_mip + 1.0)], mip - low_mip); 308 } 309 310 /* ------- RNG ------- */ 311 312 float wang_hash_noise(uint s) 313 { 314 s = (s ^ 61u) ^ (s >> 16u); 315 s *= 9u; 316 s = s ^ (s >> 4u); 317 s *= 0x27d4eb2du; 318 s = s ^ (s >> 15u); 319 320 return fract(float(s) / 4294967296.0); 321 } 322 323 /* ------- Fast Math ------- */ 324 325 /* [Drobot2014a] Low Level Optimizations for GCN */ 326 float fast_sqrt(float v) 327 { 328 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 329 } 330 331 vec2 fast_sqrt(vec2 v) 332 { 333 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 334 } 335 336 /* [Eberly2014] GPGPU Programming for Games and Science */ 337 float fast_acos(float v) 338 { 339 float res = -0.156583 * abs(v) + M_PI_2; 340 res *= fast_sqrt(1.0 - abs(v)); 341 return (v >= 0) ? res : M_PI - res; 342 } 343 344 vec2 fast_acos(vec2 v) 345 { 346 vec2 res = -0.156583 * abs(v) + M_PI_2; 347 res *= fast_sqrt(1.0 - abs(v)); 348 v.x = (v.x >= 0) ? res.x : M_PI - res.x; 349 v.y = (v.y >= 0) ? res.y : M_PI - res.y; 350 return v; 351 } 352 353 float point_plane_projection_dist(vec3 lineorigin, vec3 planeorigin, vec3 planenormal) 354 { 355 return dot(planenormal, planeorigin - lineorigin); 356 } 357 358 float line_plane_intersect_dist(vec3 lineorigin, 359 vec3 linedirection, 360 vec3 planeorigin, 361 vec3 planenormal) 362 { 363 return dot(planenormal, planeorigin - lineorigin) / dot(planenormal, linedirection); 364 } 365 366 float line_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec4 plane) 367 { 368 vec3 plane_co = plane.xyz * (-plane.w / len_squared(plane.xyz)); 369 vec3 h = lineorigin - plane_co; 370 return -dot(plane.xyz, h) / dot(plane.xyz, linedirection); 371 } 372 373 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin, vec3 planenormal) 374 { 375 float dist = line_plane_intersect_dist(lineorigin, linedirection, planeorigin, planenormal); 376 return lineorigin + linedirection * dist; 377 } 378 379 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec4 plane) 380 { 381 float dist = line_plane_intersect_dist(lineorigin, linedirection, plane); 382 return lineorigin + linedirection * dist; 383 } 384 385 float line_aligned_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 386 { 387 /* aligned plane normal */ 388 vec3 L = planeorigin - lineorigin; 389 float diskdist = length(L); 390 vec3 planenormal = -normalize(L); 391 return -diskdist / dot(planenormal, linedirection); 392 } 393 394 vec3 line_aligned_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 395 { 396 float dist = line_aligned_plane_intersect_dist(lineorigin, linedirection, planeorigin); 397 if (dist < 0) { 398 /* if intersection is behind we fake the intersection to be 399 * really far and (hopefully) not inside the radius of interest */ 400 dist = 1e16; 401 } 402 return lineorigin + linedirection * dist; 403 } 404 405 float line_unit_sphere_intersect_dist(vec3 lineorigin, vec3 linedirection) 406 { 407 float a = dot(linedirection, linedirection); 408 float b = dot(linedirection, lineorigin); 409 float c = dot(lineorigin, lineorigin) - 1; 410 411 float dist = 1e15; 412 float determinant = b * b - a * c; 413 if (determinant >= 0) { 414 dist = (sqrt(determinant) - b) / a; 415 } 416 417 return dist; 418 } 419 420 float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection) 421 { 422 /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ */ 423 vec3 firstplane = (vec3(1.0) - lineorigin) / linedirection; 424 vec3 secondplane = (vec3(-1.0) - lineorigin) / linedirection; 425 vec3 furthestplane = max(firstplane, secondplane); 426 427 return min_v3(furthestplane); 428 } 429 430 /* Return texture coordinates to sample Surface LUT */ 431 vec2 lut_coords(float cosTheta, float roughness) 432 { 433 float theta = acos(cosTheta); 434 vec2 coords = vec2(roughness, theta / M_PI_2); 435 436 /* scale and bias coordinates, for correct filtered lookup */ 437 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 438 } 439 440 vec2 lut_coords_ltc(float cosTheta, float roughness) 441 { 442 vec2 coords = vec2(roughness, sqrt(1.0 - cosTheta)); 443 444 /* scale and bias coordinates, for correct filtered lookup */ 445 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 446 } 447 448 /* -- Tangent Space conversion -- */ 449 vec3 tangent_to_world(vec3 vector, vec3 N, vec3 T, vec3 B) 450 { 451 return T * vector.x + B * vector.y + N * vector.z; 452 } 453 454 vec3 world_to_tangent(vec3 vector, vec3 N, vec3 T, vec3 B) 455 { 456 return vec3(dot(T, vector), dot(B, vector), dot(N, vector)); 457 } 458 459 void make_orthonormal_basis(vec3 N, out vec3 T, out vec3 B) 460 { 461 vec3 UpVector = abs(N.z) < 0.99999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 462 T = normalize(cross(UpVector, N)); 463 B = cross(N, T); 464 } 465 466 /* ---- Opengl Depth conversion ---- */ 467 468 float linear_depth(bool is_persp, float z, float zf, float zn) 469 { 470 if (is_persp) { 471 return (zn * zf) / (z * (zn - zf) + zf); 472 } 473 else { 474 return (z * 2.0 - 1.0) * zf; 475 } 476 } 477 478 float buffer_depth(bool is_persp, float z, float zf, float zn) 479 { 480 if (is_persp) { 481 return (zf * (zn - z)) / (z * (zn - zf)); 482 } 483 else { 484 return (z / (zf * 2.0)) + 0.5; 485 } 486 } 487 488 float get_view_z_from_depth(float depth) 489 { 490 if (ProjectionMatrix[3][3] == 0.0) { 491 float d = 2.0 * depth - 1.0; 492 return -ProjectionMatrix[3][2] / (d + ProjectionMatrix[2][2]); 493 } 494 else { 495 return viewVecs[0].z + depth * viewVecs[1].z; 496 } 497 } 498 499 float get_depth_from_view_z(float z) 500 { 501 if (ProjectionMatrix[3][3] == 0.0) { 502 float d = (-ProjectionMatrix[3][2] / z) - ProjectionMatrix[2][2]; 503 return d * 0.5 + 0.5; 504 } 505 else { 506 return (z - viewVecs[0].z) / viewVecs[1].z; 507 } 508 } 509 510 vec2 get_uvs_from_view(vec3 view) 511 { 512 vec3 ndc = project_point(ProjectionMatrix, view); 513 return ndc.xy * 0.5 + 0.5; 514 } 515 516 vec3 get_view_space_from_depth(vec2 uvcoords, float depth) 517 { 518 if (ProjectionMatrix[3][3] == 0.0) { 519 return vec3(viewVecs[0].xy + uvcoords * viewVecs[1].xy, 1.0) * get_view_z_from_depth(depth); 520 } 521 else { 522 return viewVecs[0].xyz + vec3(uvcoords, depth) * viewVecs[1].xyz; 523 } 524 } 525 526 vec3 get_world_space_from_depth(vec2 uvcoords, float depth) 527 { 528 return (ViewMatrixInverse * vec4(get_view_space_from_depth(uvcoords, depth), 1.0)).xyz; 529 } 530 531 vec3 get_specular_reflection_dominant_dir(vec3 N, vec3 V, float roughness) 532 { 533 vec3 R = -reflect(V, N); 534 float smoothness = 1.0 - roughness; 535 float fac = smoothness * (sqrt(smoothness) + roughness); 536 return normalize(mix(N, R, fac)); 537 } 538 539 float specular_occlusion(float NV, float AO, float roughness) 540 { 541 return saturate(pow(NV + AO, roughness) - 1.0 + AO); 542 } 543 544 /* --- Refraction utils --- */ 545 546 float ior_from_f0(float f0) 547 { 548 float f = sqrt(f0); 549 return (-f - 1.0) / (f - 1.0); 550 } 551 552 float f0_from_ior(float eta) 553 { 554 float A = (eta - 1.0) / (eta + 1.0); 555 return A * A; 556 } 557 558 vec3 get_specular_refraction_dominant_dir(vec3 N, vec3 V, float roughness, float ior) 559 { 560 /* TODO: This a bad approximation. Better approximation should fit 561 * the refracted vector and roughness into the best prefiltered reflection 562 * lobe. */ 563 /* Correct the IOR for ior < 1.0 to not see the abrupt delimitation or the TIR */ 564 ior = (ior < 1.0) ? mix(ior, 1.0, roughness) : ior; 565 float eta = 1.0 / ior; 566 567 float NV = dot(N, -V); 568 569 /* Custom Refraction. */ 570 float k = 1.0 - eta * eta * (1.0 - NV * NV); 571 k = max(0.0, k); /* Only this changes. */ 572 vec3 R = eta * -V - (eta * NV + sqrt(k)) * N; 573 574 return R; 575 } 576 577 float get_btdf_lut(sampler2DArray btdf_lut_tex, float NV, float roughness, float ior) 578 { 579 const vec3 lut_scale_bias_texel_size = vec3((LUT_SIZE - 1.0), 0.5, 1.5) / LUT_SIZE; 580 581 vec3 coords; 582 /* Try to compensate for the low resolution and interpolation error. */ 583 coords.x = (ior > 1.0) ? (0.9 + lut_scale_bias_texel_size.z) + 584 (0.1 - lut_scale_bias_texel_size.z) * f0_from_ior(ior) : 585 (0.9 + lut_scale_bias_texel_size.z) * ior * ior; 586 coords.y = 1.0 - saturate(NV); 587 coords.xy *= lut_scale_bias_texel_size.x; 588 coords.xy += lut_scale_bias_texel_size.y; 589 590 const float lut_lvl_ofs = 4.0; /* First texture lvl of roughness. */ 591 const float lut_lvl_scale = 16.0; /* How many lvl of roughness in the lut. */ 592 593 float mip = roughness * lut_lvl_scale; 594 float mip_floor = floor(mip); 595 596 coords.z = lut_lvl_ofs + mip_floor + 1.0; 597 float btdf_high = textureLod(btdf_lut_tex, coords, 0.0).r; 598 599 coords.z -= 1.0; 600 float btdf_low = textureLod(btdf_lut_tex, coords, 0.0).r; 601 602 float btdf = (ior == 1.0) ? 1.0 : mix(btdf_low, btdf_high, mip - coords.z); 603 604 return btdf; 605 } 606 607 /* ---- Encode / Decode Normal buffer data ---- */ 608 /* From http://aras-p.info/texts/CompactNormalStorage.html 609 * Using Method #4: Spheremap Transform */ 610 vec2 normal_encode(vec3 n, vec3 view) 611 { 612 float p = sqrt(n.z * 8.0 + 8.0); 613 return n.xy / p + 0.5; 614 } 615 616 vec3 normal_decode(vec2 enc, vec3 view) 617 { 618 vec2 fenc = enc * 4.0 - 2.0; 619 float f = dot(fenc, fenc); 620 float g = sqrt(1.0 - f / 4.0); 621 vec3 n; 622 n.xy = fenc * g; 623 n.z = 1 - f / 2; 624 return n; 625 } 626 627 /* ---- RGBM (shared multiplier) encoding ---- */ 628 /* From http://iwasbeingirony.blogspot.fr/2010/06/difference-between-rgbm-and-rgbd.html */ 629 630 /* Higher RGBM_MAX_RANGE gives imprecision issues in low intensity. */ 631 #define RGBM_MAX_RANGE 512.0 632 633 vec4 rgbm_encode(vec3 rgb) 634 { 635 float maxRGB = max_v3(rgb); 636 float M = maxRGB / RGBM_MAX_RANGE; 637 M = ceil(M * 255.0) / 255.0; 638 return vec4(rgb / (M * RGBM_MAX_RANGE), M); 639 } 640 641 vec3 rgbm_decode(vec4 data) 642 { 643 return data.rgb * (data.a * RGBM_MAX_RANGE); 644 } 645 646 /* ---- RGBE (shared exponent) encoding ---- */ 647 vec4 rgbe_encode(vec3 rgb) 648 { 649 float maxRGB = max_v3(rgb); 650 float fexp = ceil(log2(maxRGB)); 651 return vec4(rgb / exp2(fexp), (fexp + 128.0) / 255.0); 652 } 653 654 vec3 rgbe_decode(vec4 data) 655 { 656 float fexp = data.a * 255.0 - 128.0; 657 return data.rgb * exp2(fexp); 658 } 659 660 #if 1 661 # define irradiance_encode rgbe_encode 662 # define irradiance_decode rgbe_decode 663 #else /* No ecoding (when using floating point format) */ 664 # define irradiance_encode(X) (X).rgbb 665 # define irradiance_decode(X) (X).rgb 666 #endif 667 668 /* Irradiance Visibility Encoding */ 669 #if 1 670 vec4 visibility_encode(vec2 accum, float range) 671 { 672 accum /= range; 673 674 vec4 data; 675 data.x = fract(accum.x); 676 data.y = floor(accum.x) / 255.0; 677 data.z = fract(accum.y); 678 data.w = floor(accum.y) / 255.0; 679 680 return data; 681 } 682 683 vec2 visibility_decode(vec4 data, float range) 684 { 685 return (data.xz + data.yw * 255.0) * range; 686 } 687 #else /* No ecoding (when using floating point format) */ 688 vec4 visibility_encode(vec2 accum, float range) 689 { 690 return accum.xyxy; 691 } 692 693 vec2 visibility_decode(vec4 data, float range) 694 { 695 return data.xy; 696 } 697 #endif 698 699 /* Fresnel monochromatic, perfect mirror */ 700 float F_eta(float eta, float cos_theta) 701 { 702 /* compute fresnel reflectance without explicitly computing 703 * the refracted direction */ 704 float c = abs(cos_theta); 705 float g = eta * eta - 1.0 + c * c; 706 float result; 707 708 if (g > 0.0) { 709 g = sqrt(g); 710 vec2 g_c = vec2(g) + vec2(c, -c); 711 float A = g_c.y / g_c.x; 712 A *= A; 713 g_c *= c; 714 float B = (g_c.y - 1.0) / (g_c.x + 1.0); 715 B *= B; 716 result = 0.5 * A * (1.0 + B); 717 } 718 else { 719 result = 1.0; /* TIR (no refracted component) */ 720 } 721 722 return result; 723 } 724 725 /* Fresnel color blend base on fresnel factor */ 726 vec3 F_color_blend(float eta, float fresnel, vec3 f0_color) 727 { 728 float f0 = F_eta(eta, 1.0); 729 float fac = saturate((fresnel - f0) / max(1e-8, 1.0 - f0)); 730 return mix(f0_color, vec3(1.0), fac); 731 } 732 733 /* Fresnel */ 734 vec3 F_schlick(vec3 f0, float cos_theta) 735 { 736 float fac = 1.0 - cos_theta; 737 float fac2 = fac * fac; 738 fac = fac2 * fac2 * fac; 739 740 /* Unreal specular matching : if specular color is below 2% intensity, 741 * (using green channel for intensity) treat as shadowning */ 742 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * fac + (1.0 - fac) * f0; 743 } 744 745 /* Fresnel approximation for LTC area lights (not MRP) */ 746 vec3 F_area(vec3 f0, vec2 lut) 747 { 748 /* Unreal specular matching : if specular color is below 2% intensity, 749 * treat as shadowning */ 750 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 751 } 752 753 /* Fresnel approximation for IBL */ 754 vec3 F_ibl(vec3 f0, vec2 lut) 755 { 756 /* Unreal specular matching : if specular color is below 2% intensity, 757 * treat as shadowning */ 758 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 759 } 760 761 /* GGX */ 762 float D_ggx_opti(float NH, float a2) 763 { 764 float tmp = (NH * a2 - NH) * NH + 1.0; 765 return M_PI * tmp * tmp; /* Doing RCP and mul a2 at the end */ 766 } 767 768 float G1_Smith_GGX(float NX, float a2) 769 { 770 /* Using Brian Karis approach and refactoring by NX/NX 771 * this way the (2*NL)*(2*NV) in G = G1(V) * G1(L) gets canceled by the brdf denominator 4*NL*NV 772 * Rcp is done on the whole G later 773 * Note that this is not convenient for the transmission formula */ 774 return NX + sqrt(NX * (NX - NX * a2) + a2); 775 /* return 2 / (1 + sqrt(1 + a2 * (1 - NX*NX) / (NX*NX) ) ); /* Reference function */ 776 } 777 778 float bsdf_ggx(vec3 N, vec3 L, vec3 V, float roughness) 779 { 780 float a = roughness; 781 float a2 = a * a; 782 783 vec3 H = normalize(L + V); 784 float NH = max(dot(N, H), 1e-8); 785 float NL = max(dot(N, L), 1e-8); 786 float NV = max(dot(N, V), 1e-8); 787 788 float G = G1_Smith_GGX(NV, a2) * G1_Smith_GGX(NL, a2); /* Doing RCP at the end */ 789 float D = D_ggx_opti(NH, a2); 790 791 /* Denominator is canceled by G1_Smith */ 792 /* bsdf = D * G / (4.0 * NL * NV); /* Reference function */ 793 return NL * a2 / (D * G); /* NL to Fit cycles Equation : line. 345 in bsdf_microfacet.h */ 794 } 795 796 void accumulate_light(vec3 light, float fac, inout vec4 accum) 797 { 798 accum += vec4(light, 1.0) * min(fac, (1.0 - accum.a)); 799 } 800 801 /* ----------- Cone Aperture Approximation --------- */ 802 803 /* Return a fitted cone angle given the input roughness */ 804 float cone_cosine(float r) 805 { 806 /* Using phong gloss 807 * roughness = sqrt(2/(gloss+2)) */ 808 float gloss = -2 + 2 / (r * r); 809 /* Drobot 2014 in GPUPro5 */ 810 // return cos(2.0 * sqrt(2.0 / (gloss + 2))); 811 /* Uludag 2014 in GPUPro5 */ 812 // return pow(0.244, 1 / (gloss + 1)); 813 /* Jimenez 2016 in Practical Realtime Strategies for Accurate Indirect Occlusion*/ 814 return exp2(-3.32193 * r * r); 815 } 816 817 /* --------- Closure ---------- */ 818 #ifdef VOLUMETRICS 819 820 struct Closure { 821 vec3 absorption; 822 vec3 scatter; 823 vec3 emission; 824 float anisotropy; 825 }; 826 827 # define CLOSURE_DEFAULT Closure(vec3(0.0), vec3(0.0), vec3(0.0), 0.0) 828 829 Closure closure_mix(Closure cl1, Closure cl2, float fac) 830 { 831 Closure cl; 832 cl.absorption = mix(cl1.absorption, cl2.absorption, fac); 833 cl.scatter = mix(cl1.scatter, cl2.scatter, fac); 834 cl.emission = mix(cl1.emission, cl2.emission, fac); 835 cl.anisotropy = mix(cl1.anisotropy, cl2.anisotropy, fac); 836 return cl; 837 } 838 839 Closure closure_add(Closure cl1, Closure cl2) 840 { 841 Closure cl; 842 cl.absorption = cl1.absorption + cl2.absorption; 843 cl.scatter = cl1.scatter + cl2.scatter; 844 cl.emission = cl1.emission + cl2.emission; 845 cl.anisotropy = (cl1.anisotropy + cl2.anisotropy) / 2.0; /* Average phase (no multi lobe) */ 846 return cl; 847 } 848 849 Closure closure_emission(vec3 rgb) 850 { 851 Closure cl = CLOSURE_DEFAULT; 852 cl.emission = rgb; 853 return cl; 854 } 855 856 #else /* VOLUMETRICS */ 857 858 struct Closure { 859 vec3 radiance; 860 float opacity; 861 # ifdef USE_SSS 862 vec4 sss_data; 863 # ifdef USE_SSS_ALBEDO 864 vec3 sss_albedo; 865 # endif 866 # endif 867 vec4 ssr_data; 868 vec2 ssr_normal; 869 int ssr_id; 870 }; 871 872 /* This is hacking ssr_id to tag transparent bsdf */ 873 # define TRANSPARENT_CLOSURE_FLAG -2 874 # define REFRACT_CLOSURE_FLAG -3 875 # define NO_SSR -999 876 877 # ifdef USE_SSS 878 # ifdef USE_SSS_ALBEDO 879 # define CLOSURE_DEFAULT \ 880 Closure(vec3(0.0), 1.0, vec4(0.0), vec3(0.0), vec4(0.0), vec2(0.0), -1) 881 # else 882 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec4(0.0), vec2(0.0), -1) 883 # endif 884 # else 885 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec2(0.0), -1) 886 # endif 887 888 uniform int outputSsrId; 889 890 Closure closure_mix(Closure cl1, Closure cl2, float fac) 891 { 892 Closure cl; 893 894 if (cl1.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 895 cl1.ssr_normal = cl2.ssr_normal; 896 cl1.ssr_data = cl2.ssr_data; 897 cl1.ssr_id = cl2.ssr_id; 898 # ifdef USE_SSS 899 cl1.sss_data = cl2.sss_data; 900 # ifdef USE_SSS_ALBEDO 901 cl1.sss_albedo = cl2.sss_albedo; 902 # endif 903 # endif 904 } 905 if (cl2.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 906 cl2.ssr_normal = cl1.ssr_normal; 907 cl2.ssr_data = cl1.ssr_data; 908 cl2.ssr_id = cl1.ssr_id; 909 # ifdef USE_SSS 910 cl2.sss_data = cl1.sss_data; 911 # ifdef USE_SSS_ALBEDO 912 cl2.sss_albedo = cl1.sss_albedo; 913 # endif 914 # endif 915 } 916 917 /* When mixing SSR don't blend roughness. 918 * 919 * It makes no sense to mix them really, so we take either one of them and 920 * tone down its specularity (ssr_data.xyz) while keeping its roughness (ssr_data.w). 921 */ 922 if (cl1.ssr_id == outputSsrId) { 923 cl.ssr_data = mix(cl1.ssr_data.xyzw, vec4(vec3(0.0), cl1.ssr_data.w), fac); 924 cl.ssr_normal = cl1.ssr_normal; 925 cl.ssr_id = cl1.ssr_id; 926 } 927 else { 928 cl.ssr_data = mix(vec4(vec3(0.0), cl2.ssr_data.w), cl2.ssr_data.xyzw, fac); 929 cl.ssr_normal = cl2.ssr_normal; 930 cl.ssr_id = cl2.ssr_id; 931 } 932 933 cl.opacity = mix(cl1.opacity, cl2.opacity, fac); 934 cl.radiance = mix(cl1.radiance * cl1.opacity, cl2.radiance * cl2.opacity, fac); 935 cl.radiance /= max(1e-8, cl.opacity); 936 937 # ifdef USE_SSS 938 cl.sss_data.rgb = mix(cl1.sss_data.rgb, cl2.sss_data.rgb, fac); 939 cl.sss_data.a = (cl1.sss_data.a > 0.0) ? cl1.sss_data.a : cl2.sss_data.a; 940 # ifdef USE_SSS_ALBEDO 941 /* TODO Find a solution to this. Dither? */ 942 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 943 # endif 944 # endif 945 946 return cl; 947 } 948 949 Closure closure_add(Closure cl1, Closure cl2) 950 { 951 Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; 952 cl.radiance = cl1.radiance + cl2.radiance; 953 # ifdef USE_SSS 954 cl.sss_data = (cl1.sss_data.a > 0.0) ? cl1.sss_data : cl2.sss_data; 955 /* Add radiance that was supposed to be filtered but was rejected. */ 956 cl.radiance += (cl1.sss_data.a > 0.0) ? cl2.sss_data.rgb : cl1.sss_data.rgb; 957 # ifdef USE_SSS_ALBEDO 958 /* TODO Find a solution to this. Dither? */ 959 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 960 # endif 961 # endif 962 cl.opacity = saturate(cl1.opacity + cl2.opacity); 963 return cl; 964 } 965 966 Closure closure_emission(vec3 rgb) 967 { 968 Closure cl = CLOSURE_DEFAULT; 969 cl.radiance = rgb; 970 return cl; 971 } 972 973 # if defined(MESH_SHADER) && !defined(USE_ALPHA_HASH) && !defined(USE_ALPHA_CLIP) && \ 974 !defined(SHADOW_SHADER) && !defined(USE_MULTIPLY) 975 layout(location = 0) out vec4 fragColor; 976 layout(location = 1) out vec4 ssrNormals; 977 layout(location = 2) out vec4 ssrData; 978 # ifdef USE_SSS 979 layout(location = 3) out vec4 sssData; 980 # ifdef USE_SSS_ALBEDO 981 layout(location = 4) out vec4 sssAlbedo; 982 # endif /* USE_SSS_ALBEDO */ 983 # endif /* USE_SSS */ 984 985 Closure nodetree_exec(void); /* Prototype */ 986 987 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 988 /* Prototype because this file is included before volumetric_lib.glsl */ 989 vec4 volumetric_resolve(vec4 scene_color, vec2 frag_uvs, float frag_depth); 990 # endif 991 992 # define NODETREE_EXEC 993 void main() 994 { 995 Closure cl = nodetree_exec(); 996 # ifndef USE_ALPHA_BLEND 997 /* Prevent alpha hash material writing into alpha channel. */ 998 cl.opacity = 1.0; 999 # endif 1000 1001 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 1002 /* XXX fragile, better use real viewport resolution */ 1003 vec2 uvs = gl_FragCoord.xy / vec2(2 * textureSize(maxzBuffer, 0).xy); 1004 fragColor.rgb = volumetric_resolve(vec4(cl.radiance, cl.opacity), uvs, gl_FragCoord.z).rgb; 1005 fragColor.a = cl.opacity; 1006 # else 1007 fragColor = vec4(cl.radiance, cl.opacity); 1008 # endif 1009 1010 ssrNormals = cl.ssr_normal.xyyy; 1011 ssrData = cl.ssr_data; 1012 # ifdef USE_SSS 1013 sssData = cl.sss_data; 1014 # ifdef USE_SSS_ALBEDO 1015 sssAlbedo = cl.sss_albedo.rgbb; 1016 # endif 1017 # endif 1018 1019 /* For Probe capture */ 1020 # ifdef USE_SSS 1021 # ifdef USE_SSS_ALBEDO 1022 fragColor.rgb += cl.sss_data.rgb * cl.sss_albedo.rgb * float(!sssToggle); 1023 # else 1024 fragColor.rgb += cl.sss_data.rgb * float(!sssToggle); 1025 # endif 1026 # endif 1027 } 1028 1029 # endif /* MESH_SHADER && !SHADOW_SHADER */ 1030 1031 #endif /* VOLUMETRICS */ 1032 1033 Closure nodetree_exec(void); /* Prototype */ 1034 1035 /* TODO find a better place */ 1036 #ifdef USE_MULTIPLY 1037 1038 out vec4 fragColor; 1039 1040 # define NODETREE_EXEC 1041 void main() 1042 { 1043 Closure cl = nodetree_exec(); 1044 fragColor = vec4(mix(vec3(1.0), cl.radiance, cl.opacity), 1.0); 1045 } 1046 #endif 1047 1048 uniform sampler1D texHammersley; 1049 uniform sampler2D texJitter; 1050 uniform float sampleCount; 1051 uniform float invSampleCount; 1052 1053 vec2 jitternoise = vec2(0.0); 1054 1055 #ifndef UTIL_TEX 1056 # define UTIL_TEX 1057 uniform sampler2DArray utilTex; 1058 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 1059 #endif /* UTIL_TEX */ 1060 1061 void setup_noise(void) 1062 { 1063 jitternoise = texelfetch_noise_tex(gl_FragCoord.xy).rg; /* Global variable */ 1064 } 1065 1066 #ifdef HAMMERSLEY_SIZE 1067 vec3 hammersley_3d(float i, float invsamplenbr) 1068 { 1069 vec3 Xi; /* Theta, cos(Phi), sin(Phi) */ 1070 1071 Xi.x = i * invsamplenbr; /* i/samples */ 1072 Xi.x = fract(Xi.x + jitternoise.x); 1073 1074 int u = int(mod(i + jitternoise.y * HAMMERSLEY_SIZE, HAMMERSLEY_SIZE)); 1075 1076 Xi.yz = texelFetch(texHammersley, u, 0).rg; 1077 1078 return Xi; 1079 } 1080 1081 vec3 hammersley_3d(float i) 1082 { 1083 return hammersley_3d(i, invSampleCount); 1084 } 1085 #endif 1086 1087 /* -------------- BSDFS -------------- */ 1088 1089 float pdf_ggx_reflect(float NH, float a2) 1090 { 1091 return NH * a2 / D_ggx_opti(NH, a2); 1092 } 1093 1094 float pdf_hemisphere() 1095 { 1096 return 0.5 * M_1_PI; 1097 } 1098 1099 vec3 sample_ggx(vec3 rand, float a2) 1100 { 1101 /* Theta is the aperture angle of the cone */ 1102 float z = sqrt((1.0 - rand.x) / (1.0 + a2 * rand.x - rand.x)); /* cos theta */ 1103 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1104 float x = r * rand.y; 1105 float y = r * rand.z; 1106 1107 /* Microfacet Normal */ 1108 return vec3(x, y, z); 1109 } 1110 1111 vec3 sample_ggx(vec3 rand, float a2, vec3 N, vec3 T, vec3 B, out float NH) 1112 { 1113 vec3 Ht = sample_ggx(rand, a2); 1114 NH = Ht.z; 1115 return tangent_to_world(Ht, N, T, B); 1116 } 1117 1118 #ifdef HAMMERSLEY_SIZE 1119 vec3 sample_ggx(float nsample, float a2, vec3 N, vec3 T, vec3 B) 1120 { 1121 vec3 Xi = hammersley_3d(nsample); 1122 vec3 Ht = sample_ggx(Xi, a2); 1123 return tangent_to_world(Ht, N, T, B); 1124 } 1125 1126 vec3 sample_hemisphere(float nsample, vec3 N, vec3 T, vec3 B) 1127 { 1128 vec3 Xi = hammersley_3d(nsample); 1129 1130 float z = Xi.x; /* cos theta */ 1131 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1132 float x = r * Xi.y; 1133 float y = r * Xi.z; 1134 1135 vec3 Ht = vec3(x, y, z); 1136 1137 return tangent_to_world(Ht, N, T, B); 1138 } 1139 1140 vec3 sample_cone(float nsample, float angle, vec3 N, vec3 T, vec3 B) 1141 { 1142 vec3 Xi = hammersley_3d(nsample); 1143 1144 float z = cos(angle * Xi.x); /* cos theta */ 1145 float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ 1146 float x = r * Xi.y; 1147 float y = r * Xi.z; 1148 1149 vec3 Ht = vec3(x, y, z); 1150 1151 return tangent_to_world(Ht, N, T, B); 1152 } 1153 #endif 1154 1155 /* Based on Practical Realtime Strategies for Accurate Indirect Occlusion 1156 * http://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pdf 1157 * http://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pptx */ 1158 1159 #if defined(MESH_SHADER) 1160 # if !defined(USE_ALPHA_HASH) 1161 # if !defined(USE_ALPHA_CLIP) 1162 # if !defined(SHADOW_SHADER) 1163 # if !defined(USE_MULTIPLY) 1164 # if !defined(USE_ALPHA_BLEND) 1165 # define ENABLE_DEFERED_AO 1166 # endif 1167 # endif 1168 # endif 1169 # endif 1170 # endif 1171 #endif 1172 1173 #ifndef ENABLE_DEFERED_AO 1174 # if defined(STEP_RESOLVE) 1175 # define ENABLE_DEFERED_AO 1176 # endif 1177 #endif 1178 1179 #define MAX_PHI_STEP 32 1180 #define MAX_SEARCH_ITER 32 1181 #define MAX_LOD 6.0 1182 1183 #ifndef UTIL_TEX 1184 # define UTIL_TEX 1185 uniform sampler2DArray utilTex; 1186 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 1187 #endif /* UTIL_TEX */ 1188 1189 uniform sampler2D horizonBuffer; 1190 1191 /* aoSettings flags */ 1192 #define USE_AO 1 1193 #define USE_BENT_NORMAL 2 1194 #define USE_DENOISE 4 1195 1196 vec4 pack_horizons(vec4 v) 1197 { 1198 return v * 0.5 + 0.5; 1199 } 1200 vec4 unpack_horizons(vec4 v) 1201 { 1202 return v * 2.0 - 1.0; 1203 } 1204 1205 /* Returns maximum screen distance an AO ray can travel for a given view depth */ 1206 vec2 get_max_dir(float view_depth) 1207 { 1208 float homcco = ProjectionMatrix[2][3] * view_depth + ProjectionMatrix[3][3]; 1209 float max_dist = aoDistance / homcco; 1210 return vec2(ProjectionMatrix[0][0], ProjectionMatrix[1][1]) * max_dist; 1211 } 1212 1213 vec2 get_ao_dir(float jitter) 1214 { 1215 /* Only half a turn because we integrate in slices. */ 1216 jitter *= M_PI; 1217 return vec2(cos(jitter), sin(jitter)); 1218 } 1219 1220 void get_max_horizon_grouped(vec4 co1, vec4 co2, vec3 x, float lod, inout float h) 1221 { 1222 int mip = int(lod) + hizMipOffset; 1223 co1 *= mipRatio[mip].xyxy; 1224 co2 *= mipRatio[mip].xyxy; 1225 1226 float depth1 = textureLod(maxzBuffer, co1.xy, floor(lod)).r; 1227 float depth2 = textureLod(maxzBuffer, co1.zw, floor(lod)).r; 1228 float depth3 = textureLod(maxzBuffer, co2.xy, floor(lod)).r; 1229 float depth4 = textureLod(maxzBuffer, co2.zw, floor(lod)).r; 1230 1231 vec4 len, s_h; 1232 1233 vec3 s1 = get_view_space_from_depth(co1.xy, depth1); /* s View coordinate */ 1234 vec3 omega_s1 = s1 - x; 1235 len.x = length(omega_s1); 1236 s_h.x = omega_s1.z / len.x; 1237 1238 vec3 s2 = get_view_space_from_depth(co1.zw, depth2); /* s View coordinate */ 1239 vec3 omega_s2 = s2 - x; 1240 len.y = length(omega_s2); 1241 s_h.y = omega_s2.z / len.y; 1242 1243 vec3 s3 = get_view_space_from_depth(co2.xy, depth3); /* s View coordinate */ 1244 vec3 omega_s3 = s3 - x; 1245 len.z = length(omega_s3); 1246 s_h.z = omega_s3.z / len.z; 1247 1248 vec3 s4 = get_view_space_from_depth(co2.zw, depth4); /* s View coordinate */ 1249 vec3 omega_s4 = s4 - x; 1250 len.w = length(omega_s4); 1251 s_h.w = omega_s4.z / len.w; 1252 1253 /* Blend weight after half the aoDistance to fade artifacts */ 1254 vec4 blend = saturate((1.0 - len / aoDistance) * 2.0); 1255 1256 h = mix(h, max(h, s_h.x), blend.x); 1257 h = mix(h, max(h, s_h.y), blend.y); 1258 h = mix(h, max(h, s_h.z), blend.z); 1259 h = mix(h, max(h, s_h.w), blend.w); 1260 } 1261 1262 vec2 search_horizon_sweep(vec2 t_phi, vec3 pos, vec2 uvs, float jitter, vec2 max_dir) 1263 { 1264 max_dir *= max_v2(abs(t_phi)); 1265 1266 /* Convert to pixel space. */ 1267 t_phi /= vec2(textureSize(maxzBuffer, 0)); 1268 1269 /* Avoid division by 0 */ 1270 t_phi += vec2(1e-5); 1271 1272 jitter *= 0.25; 1273 1274 /* Compute end points */ 1275 vec2 corner1 = min(vec2(1.0) - uvs, max_dir); /* Top right */ 1276 vec2 corner2 = max(vec2(0.0) - uvs, -max_dir); /* Bottom left */ 1277 vec2 iter1 = corner1 / t_phi; 1278 vec2 iter2 = corner2 / t_phi; 1279 1280 vec2 min_iter = max(-iter1, -iter2); 1281 vec2 max_iter = max(iter1, iter2); 1282 1283 vec2 times = vec2(-min_v2(min_iter), min_v2(max_iter)); 1284 1285 vec2 h = vec2(-1.0); /* init at cos(pi) */ 1286 1287 /* This is freaking sexy optimized. */ 1288 for (float i = 0.0, ofs = 4.0, time = -1.0; i < MAX_SEARCH_ITER && time > times.x; 1289 i++, time -= ofs, ofs = min(exp2(MAX_LOD) * 4.0, ofs + ofs * aoQuality)) { 1290 vec4 t = max(times.xxxx, vec4(time) - (vec4(0.25, 0.5, 0.75, 1.0) - jitter) * ofs); 1291 vec4 cos1 = uvs.xyxy + t_phi.xyxy * t.xxyy; 1292 vec4 cos2 = uvs.xyxy + t_phi.xyxy * t.zzww; 1293 float lod = min(MAX_LOD, max(i - jitter * 4.0, 0.0) * aoQuality); 1294 get_max_horizon_grouped(cos1, cos2, pos, lod, h.y); 1295 } 1296 1297 for (float i = 0.0, ofs = 4.0, time = 1.0; i < MAX_SEARCH_ITER && time < times.y; 1298 i++, time += ofs, ofs = min(exp2(MAX_LOD) * 4.0, ofs + ofs * aoQuality)) { 1299 vec4 t = min(times.yyyy, vec4(time) + (vec4(0.25, 0.5, 0.75, 1.0) - jitter) * ofs); 1300 vec4 cos1 = uvs.xyxy + t_phi.xyxy * t.xxyy; 1301 vec4 cos2 = uvs.xyxy + t_phi.xyxy * t.zzww; 1302 float lod = min(MAX_LOD, max(i - jitter * 4.0, 0.0) * aoQuality); 1303 get_max_horizon_grouped(cos1, cos2, pos, lod, h.x); 1304 } 1305 1306 return h; 1307 } 1308 1309 void integrate_slice( 1310 vec3 normal, vec2 t_phi, vec2 horizons, inout float visibility, inout vec3 bent_normal) 1311 { 1312 /* Projecting Normal to Plane P defined by t_phi and omega_o */ 1313 vec3 np = vec3(t_phi.y, -t_phi.x, 0.0); /* Normal vector to Integration plane */ 1314 vec3 t = vec3(-t_phi, 0.0); 1315 vec3 n_proj = normal - np * dot(np, normal); 1316 float n_proj_len = max(1e-16, length(n_proj)); 1317 1318 float cos_n = clamp(n_proj.z / n_proj_len, -1.0, 1.0); 1319 float n = sign(dot(n_proj, t)) * fast_acos(cos_n); /* Angle between view vec and normal */ 1320 1321 /* (Slide 54) */ 1322 vec2 h = fast_acos(horizons); 1323 h.x = -h.x; 1324 1325 /* Clamping thetas (slide 58) */ 1326 h.x = n + max(h.x - n, -M_PI_2); 1327 h.y = n + min(h.y - n, M_PI_2); 1328 1329 /* Solving inner integral */ 1330 vec2 h_2 = 2.0 * h; 1331 vec2 vd = -cos(h_2 - n) + cos_n + h_2 * sin(n); 1332 float vis = (vd.x + vd.y) * 0.25 * n_proj_len; 1333 1334 visibility += vis; 1335 1336 /* O. Klehm, T. Ritschel, E. Eisemann, H.-P. Seidel 1337 * Bent Normals and Cones in Screen-space 1338 * Sec. 3.1 : Bent normals */ 1339 float b_angle = (h.x + h.y) * 0.5; 1340 bent_normal += vec3(sin(b_angle) * -t_phi, cos(b_angle)) * vis; 1341 } 1342 1343 void gtao_deferred( 1344 vec3 normal, vec4 noise, float frag_depth, out float visibility, out vec3 bent_normal) 1345 { 1346 /* Fetch early, hide latency! */ 1347 vec4 horizons = texelFetch(horizonBuffer, ivec2(gl_FragCoord.xy), 0); 1348 1349 vec4 dirs; 1350 dirs.xy = get_ao_dir(noise.x * 0.5); 1351 dirs.zw = get_ao_dir(noise.x * 0.5 + 0.5); 1352 1353 bent_normal = vec3(0.0); 1354 visibility = 0.0; 1355 1356 horizons = unpack_horizons(horizons); 1357 1358 integrate_slice(normal, dirs.xy, horizons.xy, visibility, bent_normal); 1359 integrate_slice(normal, dirs.zw, horizons.zw, visibility, bent_normal); 1360 1361 bent_normal = normalize(bent_normal / visibility); 1362 1363 visibility *= 0.5; /* We integrated 2 slices. */ 1364 } 1365 1366 void gtao(vec3 normal, vec3 position, vec4 noise, out float visibility, out vec3 bent_normal) 1367 { 1368 vec2 uvs = get_uvs_from_view(position); 1369 vec2 max_dir = get_max_dir(position.z); 1370 vec2 dir = get_ao_dir(noise.x); 1371 1372 bent_normal = vec3(0.0); 1373 visibility = 0.0; 1374 1375 /* Only trace in 2 directions. May lead to a darker result but since it's mostly for 1376 * alpha blended objects that will have overdraw, we limit the performance impact. */ 1377 vec2 horizons = search_horizon_sweep(dir, position, uvs, noise.y, max_dir); 1378 integrate_slice(normal, dir, horizons, visibility, bent_normal); 1379 1380 bent_normal = normalize(bent_normal / visibility); 1381 } 1382 1383 /* Multibounce approximation base on surface albedo. 1384 * Page 78 in the .pdf version. */ 1385 float gtao_multibounce(float visibility, vec3 albedo) 1386 { 1387 if (aoBounceFac == 0.0) 1388 return visibility; 1389 1390 /* Median luminance. Because Colored multibounce looks bad. */ 1391 float lum = dot(albedo, vec3(0.3333)); 1392 1393 float a = 2.0404 * lum - 0.3324; 1394 float b = -4.7951 * lum + 0.6417; 1395 float c = 2.7552 * lum + 0.6903; 1396 1397 float x = visibility; 1398 return max(x, ((x * a + b) * x + c) * x); 1399 } 1400 1401 /* Use the right occlusion */ 1402 float occlusion_compute(vec3 N, vec3 vpos, float user_occlusion, vec4 rand, out vec3 bent_normal) 1403 { 1404 #ifndef USE_REFRACTION 1405 if ((int(aoSettings) & USE_AO) != 0) { 1406 float visibility; 1407 vec3 vnor = mat3(ViewMatrix) * N; 1408 1409 # ifdef ENABLE_DEFERED_AO 1410 gtao_deferred(vnor, rand, gl_FragCoord.z, visibility, bent_normal); 1411 # else 1412 gtao(vnor, vpos, rand, visibility, bent_normal); 1413 # endif 1414 1415 /* Prevent some problems down the road. */ 1416 visibility = max(1e-3, visibility); 1417 1418 if ((int(aoSettings) & USE_BENT_NORMAL) != 0) { 1419 /* The bent normal will show the facet look of the mesh. Try to minimize this. */ 1420 float mix_fac = visibility * visibility * visibility; 1421 bent_normal = normalize(mix(bent_normal, vnor, mix_fac)); 1422 1423 bent_normal = transform_direction(ViewMatrixInverse, bent_normal); 1424 } 1425 else { 1426 bent_normal = N; 1427 } 1428 1429 /* Scale by user factor */ 1430 visibility = pow(visibility, aoFactor); 1431 1432 return min(visibility, user_occlusion); 1433 } 1434 #endif 1435 1436 bent_normal = N; 1437 return user_occlusion; 1438 } 1439 #define MAX_STEP 256 1440 1441 float sample_depth(vec2 uv, int index, float lod) 1442 { 1443 #ifdef PLANAR_PROBE_RAYTRACE 1444 if (index > -1) { 1445 return textureLod(planarDepth, vec3(uv, index), 0.0).r; 1446 } 1447 else { 1448 #endif 1449 /* Correct UVs for mipmaping mis-alignment */ 1450 uv *= mipRatio[int(lod) + hizMipOffset]; 1451 return textureLod(maxzBuffer, uv, lod).r; 1452 #ifdef PLANAR_PROBE_RAYTRACE 1453 } 1454 #endif 1455 } 1456 1457 vec4 sample_depth_grouped(vec4 uv1, vec4 uv2, int index, float lod) 1458 { 1459 vec4 depths; 1460 #ifdef PLANAR_PROBE_RAYTRACE 1461 if (index > -1) { 1462 depths.x = textureLod(planarDepth, vec3(uv1.xy, index), 0.0).r; 1463 depths.y = textureLod(planarDepth, vec3(uv1.zw, index), 0.0).r; 1464 depths.z = textureLod(planarDepth, vec3(uv2.xy, index), 0.0).r; 1465 depths.w = textureLod(planarDepth, vec3(uv2.zw, index), 0.0).r; 1466 } 1467 else { 1468 #endif 1469 depths.x = textureLod(maxzBuffer, uv1.xy, lod).r; 1470 depths.y = textureLod(maxzBuffer, uv1.zw, lod).r; 1471 depths.z = textureLod(maxzBuffer, uv2.xy, lod).r; 1472 depths.w = textureLod(maxzBuffer, uv2.zw, lod).r; 1473 #ifdef PLANAR_PROBE_RAYTRACE 1474 } 1475 #endif 1476 return depths; 1477 } 1478 1479 float refine_isect(float prev_delta, float curr_delta) 1480 { 1481 /** 1482 * Simplification of 2D intersection : 1483 * r0 = (0.0, prev_ss_ray.z); 1484 * r1 = (1.0, curr_ss_ray.z); 1485 * d0 = (0.0, prev_hit_depth_sample); 1486 * d1 = (1.0, curr_hit_depth_sample); 1487 * vec2 r = r1 - r0; 1488 * vec2 d = d1 - d0; 1489 * vec2 isect = ((d * cross(r1, r0)) - (r * cross(d1, d0))) / cross(r,d); 1490 * 1491 * We only want isect.x to know how much stride we need. So it simplifies : 1492 * 1493 * isect_x = (cross(r1, r0) - cross(d1, d0)) / cross(r,d); 1494 * isect_x = (prev_ss_ray.z - prev_hit_depth_sample.z) / cross(r,d); 1495 */ 1496 return saturate(prev_delta / (prev_delta - curr_delta)); 1497 } 1498 1499 void prepare_raycast(vec3 ray_origin, 1500 vec3 ray_dir, 1501 float thickness, 1502 int index, 1503 out vec4 ss_step, 1504 out vec4 ss_ray, 1505 out float max_time) 1506 { 1507 /* Negate the ray direction if it goes towards the camera. 1508 * This way we don't need to care if the projected point 1509 * is behind the near plane. */ 1510 float z_sign = -sign(ray_dir.z); 1511 vec3 ray_end = ray_origin + z_sign * ray_dir; 1512 1513 /* Project into screen space. */ 1514 vec4 ss_start, ss_end; 1515 ss_start.xyz = project_point(ProjectionMatrix, ray_origin); 1516 ss_end.xyz = project_point(ProjectionMatrix, ray_end); 1517 1518 /* We interpolate the ray Z + thickness values to check if depth is within threshold. */ 1519 ray_origin.z -= thickness; 1520 ray_end.z -= thickness; 1521 ss_start.w = project_point(ProjectionMatrix, ray_origin).z; 1522 ss_end.w = project_point(ProjectionMatrix, ray_end).z; 1523 1524 /* XXX This is a hack a better method is welcome ! */ 1525 /* We take the delta between the offseted depth and the depth and substract it from the ray depth. 1526 * This will change the world space thickness appearance a bit but we can have negative 1527 * values without worries. We cannot do this in viewspace because of the perspective division. */ 1528 ss_start.w = 2.0 * ss_start.z - ss_start.w; 1529 ss_end.w = 2.0 * ss_end.z - ss_end.w; 1530 1531 ss_step = ss_end - ss_start; 1532 max_time = length(ss_step.xyz); 1533 ss_step = z_sign * ss_step / length(ss_step.xyz); 1534 1535 /* If the line is degenerate, make it cover at least one pixel 1536 * to not have to handle zero-pixel extent as a special case later */ 1537 ss_step.xy += vec2((dot(ss_step.xy, ss_step.xy) < 0.00001) ? 0.001 : 0.0); 1538 1539 /* Make ss_step cover one pixel. */ 1540 ss_step /= max(abs(ss_step.x), abs(ss_step.y)); 1541 ss_step *= (abs(ss_step.x) > abs(ss_step.y)) ? ssrPixelSize.x : ssrPixelSize.y; 1542 1543 /* Clip to segment's end. */ 1544 max_time /= length(ss_step.xyz); 1545 1546 /* Clipping to frustum sides. */ 1547 max_time = min(max_time, line_unit_box_intersect_dist(ss_start.xyz, ss_step.xyz)); 1548 1549 /* Convert to texture coords. Z component included 1550 * since this is how it's stored in the depth buffer. 1551 * 4th component how far we are on the ray */ 1552 #ifdef PLANAR_PROBE_RAYTRACE 1553 /* Planar Reflections have X mirrored. */ 1554 vec2 m = (index > -1) ? vec2(-0.5, 0.5) : vec2(0.5); 1555 #else 1556 const vec2 m = vec2(0.5); 1557 #endif 1558 ss_ray = ss_start * m.xyyy + 0.5; 1559 ss_step *= m.xyyy; 1560 1561 ss_ray.xy += m * ssrPixelSize * 2.0; /* take the center of the texel. * 2 because halfres. */ 1562 } 1563 1564 /* See times_and_deltas. */ 1565 #define curr_time times_and_deltas.x 1566 #define prev_time times_and_deltas.y 1567 #define curr_delta times_and_deltas.z 1568 #define prev_delta times_and_deltas.w 1569 1570 // #define GROUPED_FETCHES /* is still slower, need to see where is the bottleneck. */ 1571 /* Return the hit position, and negate the z component (making it positive) if not hit occurred. */ 1572 /* __ray_dir__ is the ray direction premultiplied by it's maximum length */ 1573 vec3 raycast(int index, 1574 vec3 ray_origin, 1575 vec3 ray_dir, 1576 float thickness, 1577 float ray_jitter, 1578 float trace_quality, 1579 float roughness, 1580 const bool discard_backface) 1581 { 1582 vec4 ss_step, ss_start; 1583 float max_time; 1584 prepare_raycast(ray_origin, ray_dir, thickness, index, ss_step, ss_start, max_time); 1585 1586 float max_trace_time = max(0.01, max_time - 0.01); 1587 1588 #ifdef GROUPED_FETCHES 1589 ray_jitter *= 0.25; 1590 #endif 1591 1592 /* x : current_time, y: previous_time, z: current_delta, w: previous_delta */ 1593 vec4 times_and_deltas = vec4(0.0); 1594 1595 float ray_time = 0.0; 1596 float depth_sample = sample_depth(ss_start.xy, index, 0.0); 1597 curr_delta = depth_sample - ss_start.z; 1598 1599 float lod_fac = saturate(fast_sqrt(roughness) * 2.0 - 0.4); 1600 bool hit = false; 1601 float iter; 1602 for (iter = 1.0; !hit && (ray_time < max_time) && (iter < MAX_STEP); iter++) { 1603 /* Minimum stride of 2 because we are using half res minmax zbuffer. */ 1604 float stride = max(1.0, iter * trace_quality) * 2.0; 1605 float lod = log2(stride * 0.5 * trace_quality) * lod_fac; 1606 ray_time += stride; 1607 1608 /* Save previous values. */ 1609 times_and_deltas.xyzw = times_and_deltas.yxwz; 1610 1611 #ifdef GROUPED_FETCHES 1612 stride *= 4.0; 1613 vec4 jit_stride = mix(vec4(2.0), vec4(stride), vec4(0.0, 0.25, 0.5, 0.75) + ray_jitter); 1614 1615 vec4 times = min(vec4(ray_time) + jit_stride, vec4(max_trace_time)); 1616 1617 vec4 uv1 = ss_start.xyxy + ss_step.xyxy * times.xxyy; 1618 vec4 uv2 = ss_start.xyxy + ss_step.xyxy * times.zzww; 1619 1620 vec4 depth_samples = sample_depth_grouped(uv1, uv2, index, lod); 1621 1622 vec4 ray_z = ss_start.zzzz + ss_step.zzzz * times.xyzw; 1623 vec4 ray_w = ss_start.wwww + ss_step.wwww * vec4(prev_time, times.xyz); 1624 1625 vec4 deltas = depth_samples - ray_z; 1626 /* Same as component wise (curr_delta <= 0.0) && (prev_w <= depth_sample). */ 1627 bvec4 test = equal(step(deltas, vec4(0.0)) * step(ray_w, depth_samples), vec4(1.0)); 1628 hit = any(test); 1629 1630 if (hit) { 1631 vec2 m = vec2(1.0, 0.0); /* Mask */ 1632 1633 vec4 ret_times_and_deltas = times.wzzz * m.xxyy + deltas.wwwz * m.yyxx; 1634 ret_times_and_deltas = (test.z) ? times.zyyy * m.xxyy + deltas.zzzy * m.yyxx : 1635 ret_times_and_deltas; 1636 ret_times_and_deltas = (test.y) ? times.yxxx * m.xxyy + deltas.yyyx * m.yyxx : 1637 ret_times_and_deltas; 1638 times_and_deltas = (test.x) ? times.xxxx * m.xyyy + deltas.xxxx * m.yyxy + 1639 times_and_deltas.yyww * m.yxyx : 1640 ret_times_and_deltas; 1641 1642 depth_sample = depth_samples.w; 1643 depth_sample = (test.z) ? depth_samples.z : depth_sample; 1644 depth_sample = (test.y) ? depth_samples.y : depth_sample; 1645 depth_sample = (test.x) ? depth_samples.x : depth_sample; 1646 } 1647 else { 1648 curr_time = times.w; 1649 curr_delta = deltas.w; 1650 } 1651 #else 1652 float jit_stride = mix(2.0, stride, ray_jitter); 1653 1654 curr_time = min(ray_time + jit_stride, max_trace_time); 1655 vec4 ss_ray = ss_start + ss_step * curr_time; 1656 1657 depth_sample = sample_depth(ss_ray.xy, index, lod); 1658 1659 float prev_w = ss_start.w + ss_step.w * prev_time; 1660 curr_delta = depth_sample - ss_ray.z; 1661 hit = (curr_delta <= 0.0) && (prev_w <= depth_sample); 1662 #endif 1663 } 1664 1665 if (discard_backface) { 1666 /* Discard backface hits */ 1667 hit = hit && (prev_delta > 0.0); 1668 } 1669 1670 /* Reject hit if background. */ 1671 hit = hit && (depth_sample != 1.0); 1672 1673 curr_time = (hit) ? mix(prev_time, curr_time, refine_isect(prev_delta, curr_delta)) : curr_time; 1674 ray_time = (hit) ? curr_time : ray_time; 1675 1676 /* Clip to frustum. */ 1677 ray_time = max(0.001, min(ray_time, max_time - 1.5)); 1678 1679 vec4 ss_ray = ss_start + ss_step * ray_time; 1680 1681 /* Tag Z if ray failed. */ 1682 ss_ray.z *= (hit) ? 1.0 : -1.0; 1683 return ss_ray.xyz; 1684 } 1685 1686 float screen_border_mask(vec2 hit_co) 1687 { 1688 const float margin = 0.003; 1689 float atten = ssrBorderFac + margin; /* Screen percentage */ 1690 hit_co = smoothstep(margin, atten, hit_co) * (1 - smoothstep(1.0 - atten, 1.0 - margin, hit_co)); 1691 1692 float screenfade = hit_co.x * hit_co.y; 1693 1694 return screenfade; 1695 } 1696 /* ------------ Refraction ------------ */ 1697 1698 #define BTDF_BIAS 0.85 1699 1700 vec4 screen_space_refraction( 1701 vec3 viewPosition, vec3 N, vec3 V, float ior, float roughnessSquared, vec4 rand) 1702 { 1703 float a2 = max(5e-6, roughnessSquared * roughnessSquared); 1704 1705 /* Importance sampling bias */ 1706 rand.x = mix(rand.x, 0.0, BTDF_BIAS); 1707 1708 vec3 T, B; 1709 float NH; 1710 make_orthonormal_basis(N, T, B); 1711 vec3 H = sample_ggx(rand.xzw, a2, N, T, B, NH); /* Microfacet normal */ 1712 float pdf = pdf_ggx_reflect(NH, a2); 1713 1714 /* If ray is bad (i.e. going below the plane) regenerate. */ 1715 if (F_eta(ior, dot(H, V)) < 1.0) { 1716 H = sample_ggx(rand.xzw * vec3(1.0, -1.0, -1.0), a2, N, T, B, NH); /* Microfacet normal */ 1717 pdf = pdf_ggx_reflect(NH, a2); 1718 } 1719 1720 vec3 vV = viewCameraVec; 1721 float eta = 1.0 / ior; 1722 if (dot(H, V) < 0.0) { 1723 H = -H; 1724 eta = ior; 1725 } 1726 1727 vec3 R = refract(-V, H, 1.0 / ior); 1728 1729 R = transform_direction(ViewMatrix, R); 1730 1731 vec3 hit_pos = raycast( 1732 -1, viewPosition, R * 1e16, ssrThickness, rand.y, ssrQuality, roughnessSquared, false); 1733 1734 if ((hit_pos.z > 0.0) && (F_eta(ior, dot(H, V)) < 1.0)) { 1735 hit_pos = get_view_space_from_depth(hit_pos.xy, hit_pos.z); 1736 float hit_dist = distance(hit_pos, viewPosition); 1737 1738 float cone_cos = cone_cosine(roughnessSquared); 1739 float cone_tan = sqrt(1 - cone_cos * cone_cos) / cone_cos; 1740 1741 /* Empirical fit for refraction. */ 1742 /* TODO find a better fit or precompute inside the LUT. */ 1743 cone_tan *= 0.5 * fast_sqrt(f0_from_ior((ior < 1.0) ? 1.0 / ior : ior)); 1744 1745 float cone_footprint = hit_dist * cone_tan; 1746 1747 /* find the offset in screen space by multiplying a point 1748 * in camera space at the depth of the point by the projection matrix. */ 1749 float homcoord = ProjectionMatrix[2][3] * hit_pos.z + ProjectionMatrix[3][3]; 1750 /* UV space footprint */ 1751 cone_footprint = BTDF_BIAS * 0.5 * max(ProjectionMatrix[0][0], ProjectionMatrix[1][1]) * 1752 cone_footprint / homcoord; 1753 1754 vec2 hit_uvs = project_point(ProjectionMatrix, hit_pos).xy * 0.5 + 0.5; 1755 1756 /* Texel footprint */ 1757 vec2 texture_size = vec2(textureSize(colorBuffer, 0).xy); 1758 float mip = clamp(log2(cone_footprint * max(texture_size.x, texture_size.y)), 0.0, 9.0); 1759 1760 /* Correct UVs for mipmaping mis-alignment */ 1761 hit_uvs *= mip_ratio_interp(mip); 1762 1763 vec3 spec = textureLod(colorBuffer, hit_uvs, mip).xyz; 1764 float mask = screen_border_mask(hit_uvs); 1765 1766 return vec4(spec, mask); 1767 } 1768 1769 return vec4(0.0); 1770 } 1771 1772 vec2 mapping_octahedron(vec3 cubevec, vec2 texel_size) 1773 { 1774 /* projection onto octahedron */ 1775 cubevec /= dot(vec3(1.0), abs(cubevec)); 1776 1777 /* out-folding of the downward faces */ 1778 if (cubevec.z < 0.0) { 1779 vec2 cubevec_sign = step(0.0, cubevec.xy) * 2.0 - 1.0; 1780 cubevec.xy = (1.0 - abs(cubevec.yx)) * cubevec_sign; 1781 } 1782 1783 /* mapping to [0;1]ˆ2 texture space */ 1784 vec2 uvs = cubevec.xy * (0.5) + 0.5; 1785 1786 /* edge filtering fix */ 1787 uvs = (1.0 - 2.0 * texel_size) * uvs + texel_size; 1788 1789 return uvs; 1790 } 1791 1792 vec4 textureLod_octahedron(sampler2DArray tex, vec4 cubevec, float lod, float lod_max) 1793 { 1794 vec2 texelSize = 1.0 / vec2(textureSize(tex, int(lod_max))); 1795 1796 vec2 uvs = mapping_octahedron(cubevec.xyz, texelSize); 1797 1798 return textureLod(tex, vec3(uvs, cubevec.w), lod); 1799 } 1800 1801 vec4 texture_octahedron(sampler2DArray tex, vec4 cubevec) 1802 { 1803 vec2 texelSize = 1.0 / vec2(textureSize(tex, 0)); 1804 1805 vec2 uvs = mapping_octahedron(cubevec.xyz, texelSize); 1806 1807 return texture(tex, vec3(uvs, cubevec.w)); 1808 } 1809 1810 uniform sampler2DArray irradianceGrid; 1811 1812 #define IRRADIANCE_LIB 1813 1814 #ifdef IRRADIANCE_CUBEMAP 1815 struct IrradianceData { 1816 vec3 color; 1817 }; 1818 #elif defined(IRRADIANCE_SH_L2) 1819 struct IrradianceData { 1820 vec3 shcoefs[9]; 1821 }; 1822 #else /* defined(IRRADIANCE_HL2) */ 1823 struct IrradianceData { 1824 vec3 cubesides[3]; 1825 }; 1826 #endif 1827 1828 IrradianceData load_irradiance_cell(int cell, vec3 N) 1829 { 1830 /* Keep in sync with diffuse_filter_probe() */ 1831 1832 #if defined(IRRADIANCE_CUBEMAP) 1833 1834 # define AMBIANT_CUBESIZE 8 1835 ivec2 cell_co = ivec2(AMBIANT_CUBESIZE); 1836 int cell_per_row = textureSize(irradianceGrid, 0).x / cell_co.x; 1837 cell_co.x *= cell % cell_per_row; 1838 cell_co.y *= cell / cell_per_row; 1839 1840 vec2 texelSize = 1.0 / vec2(AMBIANT_CUBESIZE); 1841 1842 vec2 uvs = mapping_octahedron(N, texelSize); 1843 uvs *= vec2(AMBIANT_CUBESIZE) / vec2(textureSize(irradianceGrid, 0)); 1844 uvs += vec2(cell_co) / vec2(textureSize(irradianceGrid, 0)); 1845 1846 IrradianceData ir; 1847 ir.color = texture(irradianceGrid, vec3(uvs, 0.0)).rgb; 1848 1849 #elif defined(IRRADIANCE_SH_L2) 1850 1851 ivec2 cell_co = ivec2(3, 3); 1852 int cell_per_row = textureSize(irradianceGrid, 0).x / cell_co.x; 1853 cell_co.x *= cell % cell_per_row; 1854 cell_co.y *= cell / cell_per_row; 1855 1856 ivec3 ofs = ivec3(0, 1, 2); 1857 1858 IrradianceData ir; 1859 ir.shcoefs[0] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.xx, 0), 0).rgb; 1860 ir.shcoefs[1] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.yx, 0), 0).rgb; 1861 ir.shcoefs[2] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.zx, 0), 0).rgb; 1862 ir.shcoefs[3] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.xy, 0), 0).rgb; 1863 ir.shcoefs[4] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.yy, 0), 0).rgb; 1864 ir.shcoefs[5] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.zy, 0), 0).rgb; 1865 ir.shcoefs[6] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.xz, 0), 0).rgb; 1866 ir.shcoefs[7] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.yz, 0), 0).rgb; 1867 ir.shcoefs[8] = texelFetch(irradianceGrid, ivec3(cell_co + ofs.zz, 0), 0).rgb; 1868 1869 #else /* defined(IRRADIANCE_HL2) */ 1870 1871 ivec2 cell_co = ivec2(3, 2); 1872 int cell_per_row = textureSize(irradianceGrid, 0).x / cell_co.x; 1873 cell_co.x *= cell % cell_per_row; 1874 cell_co.y *= cell / cell_per_row; 1875 1876 ivec3 is_negative = ivec3(step(0.0, -N)); 1877 1878 IrradianceData ir; 1879 ir.cubesides[0] = irradiance_decode( 1880 texelFetch(irradianceGrid, ivec3(cell_co + ivec2(0, is_negative.x), 0), 0)); 1881 ir.cubesides[1] = irradiance_decode( 1882 texelFetch(irradianceGrid, ivec3(cell_co + ivec2(1, is_negative.y), 0), 0)); 1883 ir.cubesides[2] = irradiance_decode( 1884 texelFetch(irradianceGrid, ivec3(cell_co + ivec2(2, is_negative.z), 0), 0)); 1885 1886 #endif 1887 1888 return ir; 1889 } 1890 1891 float load_visibility_cell(int cell, vec3 L, float dist, float bias, float bleed_bias, float range) 1892 { 1893 /* Keep in sync with diffuse_filter_probe() */ 1894 ivec2 cell_co = ivec2(prbIrradianceVisSize); 1895 ivec2 cell_per_row_col = textureSize(irradianceGrid, 0).xy / prbIrradianceVisSize; 1896 cell_co.x *= (cell % cell_per_row_col.x); 1897 cell_co.y *= (cell / cell_per_row_col.x) % cell_per_row_col.y; 1898 float layer = 1.0 + float((cell / cell_per_row_col.x) / cell_per_row_col.y); 1899 1900 vec2 texel_size = 1.0 / vec2(textureSize(irradianceGrid, 0).xy); 1901 vec2 co = vec2(cell_co) * texel_size; 1902 1903 vec2 uv = mapping_octahedron(-L, vec2(1.0 / float(prbIrradianceVisSize))); 1904 uv *= vec2(prbIrradianceVisSize) * texel_size; 1905 1906 vec4 data = texture(irradianceGrid, vec3(co + uv, layer)); 1907 1908 /* Decoding compressed data */ 1909 vec2 moments = visibility_decode(data, range); 1910 1911 /* Doing chebishev test */ 1912 float variance = abs(moments.x * moments.x - moments.y); 1913 variance = max(variance, bias / 10.0); 1914 1915 float d = dist - moments.x; 1916 float p_max = variance / (variance + d * d); 1917 1918 /* Increase contrast in the weight by squaring it */ 1919 p_max *= p_max; 1920 1921 /* Now reduce light-bleeding by removing the [0, x] tail and linearly rescaling (x, 1] */ 1922 p_max = clamp((p_max - bleed_bias) / (1.0 - bleed_bias), 0.0, 1.0); 1923 1924 return (dist <= moments.x) ? 1.0 : p_max; 1925 } 1926 1927 /* http://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/ */ 1928 vec3 spherical_harmonics_L1(vec3 N, vec3 shcoefs[4]) 1929 { 1930 vec3 sh = vec3(0.0); 1931 1932 sh += 0.282095 * shcoefs[0]; 1933 1934 sh += -0.488603 * N.z * shcoefs[1]; 1935 sh += 0.488603 * N.y * shcoefs[2]; 1936 sh += -0.488603 * N.x * shcoefs[3]; 1937 1938 return sh; 1939 } 1940 1941 vec3 spherical_harmonics_L2(vec3 N, vec3 shcoefs[9]) 1942 { 1943 vec3 sh = vec3(0.0); 1944 1945 sh += 0.282095 * shcoefs[0]; 1946 1947 sh += -0.488603 * N.z * shcoefs[1]; 1948 sh += 0.488603 * N.y * shcoefs[2]; 1949 sh += -0.488603 * N.x * shcoefs[3]; 1950 1951 sh += 1.092548 * N.x * N.z * shcoefs[4]; 1952 sh += -1.092548 * N.z * N.y * shcoefs[5]; 1953 sh += 0.315392 * (3.0 * N.y * N.y - 1.0) * shcoefs[6]; 1954 sh += -1.092548 * N.x * N.y * shcoefs[7]; 1955 sh += 0.546274 * (N.x * N.x - N.z * N.z) * shcoefs[8]; 1956 1957 return sh; 1958 } 1959 1960 vec3 hl2_basis(vec3 N, vec3 cubesides[3]) 1961 { 1962 vec3 irradiance = vec3(0.0); 1963 1964 vec3 n_squared = N * N; 1965 1966 irradiance += n_squared.x * cubesides[0]; 1967 irradiance += n_squared.y * cubesides[1]; 1968 irradiance += n_squared.z * cubesides[2]; 1969 1970 return irradiance; 1971 } 1972 1973 vec3 compute_irradiance(vec3 N, IrradianceData ird) 1974 { 1975 #if defined(IRRADIANCE_CUBEMAP) 1976 return ird.color; 1977 #elif defined(IRRADIANCE_SH_L2) 1978 return spherical_harmonics_L2(N, ird.shcoefs); 1979 #else /* defined(IRRADIANCE_HL2) */ 1980 return hl2_basis(N, ird.cubesides); 1981 #endif 1982 } 1983 1984 vec3 irradiance_from_cell_get(int cell, vec3 ir_dir) 1985 { 1986 IrradianceData ir_data = load_irradiance_cell(cell, ir_dir); 1987 return compute_irradiance(ir_dir, ir_data); 1988 } 1989 /* ----------- Uniforms --------- */ 1990 1991 uniform sampler2DArray probePlanars; 1992 uniform sampler2DArray probeCubes; 1993 1994 /* ----------- Structures --------- */ 1995 1996 struct CubeData { 1997 vec4 position_type; 1998 vec4 attenuation_fac_type; 1999 mat4 influencemat; 2000 mat4 parallaxmat; 2001 }; 2002 2003 #define PROBE_PARALLAX_BOX 1.0 2004 #define PROBE_ATTENUATION_BOX 1.0 2005 2006 #define p_position position_type.xyz 2007 #define p_parallax_type position_type.w 2008 #define p_atten_fac attenuation_fac_type.x 2009 #define p_atten_type attenuation_fac_type.y 2010 2011 struct PlanarData { 2012 vec4 plane_equation; 2013 vec4 clip_vec_x_fade_scale; 2014 vec4 clip_vec_y_fade_bias; 2015 vec4 clip_edges; 2016 vec4 facing_scale_bias; 2017 mat4 reflectionmat; /* transform world space into reflection texture space */ 2018 mat4 unused; 2019 }; 2020 2021 #define pl_plane_eq plane_equation 2022 #define pl_normal plane_equation.xyz 2023 #define pl_facing_scale facing_scale_bias.x 2024 #define pl_facing_bias facing_scale_bias.y 2025 #define pl_fade_scale clip_vec_x_fade_scale.w 2026 #define pl_fade_bias clip_vec_y_fade_bias.w 2027 #define pl_clip_pos_x clip_vec_x_fade_scale.xyz 2028 #define pl_clip_pos_y clip_vec_y_fade_bias.xyz 2029 #define pl_clip_edges clip_edges 2030 2031 struct GridData { 2032 mat4 localmat; 2033 ivec4 resolution_offset; 2034 vec4 ws_corner_atten_scale; /* world space corner position */ 2035 vec4 ws_increment_x_atten_bias; /* world space vector between 2 opposite cells */ 2036 vec4 ws_increment_y_lvl_bias; 2037 vec4 ws_increment_z; 2038 vec4 vis_bias_bleed_range; 2039 }; 2040 2041 #define g_corner ws_corner_atten_scale.xyz 2042 #define g_atten_scale ws_corner_atten_scale.w 2043 #define g_atten_bias ws_increment_x_atten_bias.w 2044 #define g_level_bias ws_increment_y_lvl_bias.w 2045 #define g_increment_x ws_increment_x_atten_bias.xyz 2046 #define g_increment_y ws_increment_y_lvl_bias.xyz 2047 #define g_increment_z ws_increment_z.xyz 2048 #define g_resolution resolution_offset.xyz 2049 #define g_offset resolution_offset.w 2050 #define g_vis_bias vis_bias_bleed_range.x 2051 #define g_vis_bleed vis_bias_bleed_range.y 2052 #define g_vis_range vis_bias_bleed_range.z 2053 2054 #ifndef MAX_PROBE 2055 # define MAX_PROBE 1 2056 #endif 2057 #ifndef MAX_GRID 2058 # define MAX_GRID 1 2059 #endif 2060 #ifndef MAX_PLANAR 2061 # define MAX_PLANAR 1 2062 #endif 2063 2064 #ifndef UTIL_TEX 2065 # define UTIL_TEX 2066 uniform sampler2DArray utilTex; 2067 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 2068 #endif /* UTIL_TEX */ 2069 2070 layout(std140) uniform probe_block 2071 { 2072 CubeData probes_data[MAX_PROBE]; 2073 }; 2074 2075 layout(std140) uniform grid_block 2076 { 2077 GridData grids_data[MAX_GRID]; 2078 }; 2079 2080 layout(std140) uniform planar_block 2081 { 2082 PlanarData planars_data[MAX_PLANAR]; 2083 }; 2084 2085 /* ----------- Functions --------- */ 2086 2087 float probe_attenuation_cube(int pd_id, vec3 W) 2088 { 2089 vec3 localpos = transform_point(probes_data[pd_id].influencemat, W); 2090 2091 float probe_atten_fac = probes_data[pd_id].p_atten_fac; 2092 float fac; 2093 if (probes_data[pd_id].p_atten_type == PROBE_ATTENUATION_BOX) { 2094 vec3 axes_fac = saturate(probe_atten_fac - probe_atten_fac * abs(localpos)); 2095 fac = min_v3(axes_fac); 2096 } 2097 else { 2098 fac = saturate(probe_atten_fac - probe_atten_fac * length(localpos)); 2099 } 2100 2101 return fac; 2102 } 2103 2104 float probe_attenuation_planar(PlanarData pd, vec3 W, vec3 N, float roughness) 2105 { 2106 /* Normal Facing */ 2107 float fac = saturate(dot(pd.pl_normal, N) * pd.pl_facing_scale + pd.pl_facing_bias); 2108 2109 /* Distance from plane */ 2110 fac *= saturate(abs(dot(pd.pl_plane_eq, vec4(W, 1.0))) * pd.pl_fade_scale + pd.pl_fade_bias); 2111 2112 /* Fancy fast clipping calculation */ 2113 vec2 dist_to_clip; 2114 dist_to_clip.x = dot(pd.pl_clip_pos_x, W); 2115 dist_to_clip.y = dot(pd.pl_clip_pos_y, W); 2116 /* compare and add all tests */ 2117 fac *= step(2.0, dot(step(pd.pl_clip_edges, dist_to_clip.xxyy), vec2(-1.0, 1.0).xyxy)); 2118 2119 /* Decrease influence for high roughness */ 2120 fac *= saturate(1.0 - roughness * 10.0); 2121 2122 return fac; 2123 } 2124 2125 float probe_attenuation_grid(GridData gd, mat4 localmat, vec3 W, out vec3 localpos) 2126 { 2127 localpos = transform_point(localmat, W); 2128 vec3 pos_to_edge = max(vec3(0.0), abs(localpos) - 1.0); 2129 float fade = length(pos_to_edge); 2130 return saturate(-fade * gd.g_atten_scale + gd.g_atten_bias); 2131 } 2132 2133 vec3 probe_evaluate_cube(int pd_id, vec3 W, vec3 R, float roughness) 2134 { 2135 /* Correct reflection ray using parallax volume intersection. */ 2136 vec3 localpos = transform_point(probes_data[pd_id].parallaxmat, W); 2137 vec3 localray = transform_direction(probes_data[pd_id].parallaxmat, R); 2138 2139 float dist; 2140 if (probes_data[pd_id].p_parallax_type == PROBE_PARALLAX_BOX) { 2141 dist = line_unit_box_intersect_dist(localpos, localray); 2142 } 2143 else { 2144 dist = line_unit_sphere_intersect_dist(localpos, localray); 2145 } 2146 2147 /* Use Distance in WS directly to recover intersection */ 2148 vec3 intersection = W + R * dist - probes_data[pd_id].p_position; 2149 2150 /* From Frostbite PBR Course 2151 * Distance based roughness 2152 * http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf */ 2153 float original_roughness = roughness; 2154 float linear_roughness = sqrt(roughness); 2155 float distance_roughness = saturate(dist * linear_roughness / length(intersection)); 2156 linear_roughness = mix(distance_roughness, linear_roughness, linear_roughness); 2157 roughness = linear_roughness * linear_roughness; 2158 2159 float fac = saturate(original_roughness * 2.0 - 1.0); 2160 R = mix(intersection, R, fac * fac); 2161 2162 return textureLod_octahedron( 2163 probeCubes, vec4(R, float(pd_id)), roughness * prbLodCubeMax, prbLodCubeMax) 2164 .rgb; 2165 } 2166 2167 vec3 probe_evaluate_world_spec(vec3 R, float roughness) 2168 { 2169 return textureLod_octahedron(probeCubes, vec4(R, 0.0), roughness * prbLodCubeMax, prbLodCubeMax) 2170 .rgb; 2171 } 2172 2173 vec3 probe_evaluate_planar( 2174 float id, PlanarData pd, vec3 W, vec3 N, vec3 V, float roughness, inout float fade) 2175 { 2176 /* Find view vector / reflection plane intersection. */ 2177 vec3 point_on_plane = line_plane_intersect(W, V, pd.pl_plane_eq); 2178 2179 /* How far the pixel is from the plane. */ 2180 float ref_depth = 1.0; /* TODO parameter */ 2181 2182 /* Compute distorded reflection vector based on the distance to the reflected object. 2183 * In other words find intersection between reflection vector and the sphere center 2184 * around point_on_plane. */ 2185 vec3 proj_ref = reflect(reflect(-V, N) * ref_depth, pd.pl_normal); 2186 2187 /* Final point in world space. */ 2188 vec3 ref_pos = point_on_plane + proj_ref; 2189 2190 /* Reproject to find texture coords. */ 2191 vec4 refco = ViewProjectionMatrix * vec4(ref_pos, 1.0); 2192 refco.xy /= refco.w; 2193 2194 /* TODO: If we support non-ssr planar reflection, we should blur them with gaussian 2195 * and chose the right mip depending on the cone footprint after projection */ 2196 /* NOTE: X is inverted here to compensate inverted drawing. */ 2197 vec3 sample = textureLod(probePlanars, vec3(refco.xy * vec2(-0.5, 0.5) + 0.5, id), 0.0).rgb; 2198 2199 return sample; 2200 } 2201 2202 void fallback_cubemap(vec3 N, 2203 vec3 V, 2204 vec3 W, 2205 vec3 viewPosition, 2206 float roughness, 2207 float roughnessSquared, 2208 inout vec4 spec_accum) 2209 { 2210 /* Specular probes */ 2211 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 2212 2213 #ifdef SSR_AO 2214 vec4 rand = texelfetch_noise_tex(gl_FragCoord.xy); 2215 vec3 bent_normal; 2216 float final_ao = occlusion_compute(N, viewPosition, 1.0, rand, bent_normal); 2217 final_ao = specular_occlusion(dot(N, V), final_ao, roughness); 2218 #else 2219 const float final_ao = 1.0; 2220 #endif 2221 2222 /* Starts at 1 because 0 is world probe */ 2223 for (int i = 1; i < MAX_PROBE && i < prbNumRenderCube && spec_accum.a < 0.999; ++i) { 2224 float fade = probe_attenuation_cube(i, W); 2225 2226 if (fade > 0.0) { 2227 vec3 spec = final_ao * probe_evaluate_cube(i, W, spec_dir, roughness); 2228 accumulate_light(spec, fade, spec_accum); 2229 } 2230 } 2231 2232 /* World Specular */ 2233 if (spec_accum.a < 0.999) { 2234 vec3 spec = final_ao * probe_evaluate_world_spec(spec_dir, roughness); 2235 accumulate_light(spec, 1.0, spec_accum); 2236 } 2237 } 2238 2239 #ifdef IRRADIANCE_LIB 2240 vec3 probe_evaluate_grid(GridData gd, vec3 W, vec3 N, vec3 localpos) 2241 { 2242 localpos = localpos * 0.5 + 0.5; 2243 localpos = localpos * vec3(gd.g_resolution) - 0.5; 2244 2245 vec3 localpos_floored = floor(localpos); 2246 vec3 trilinear_weight = fract(localpos); 2247 2248 float weight_accum = 0.0; 2249 vec3 irradiance_accum = vec3(0.0); 2250 2251 /* For each neighboor cells */ 2252 for (int i = 0; i < 8; ++i) { 2253 ivec3 offset = ivec3(i, i >> 1, i >> 2) & ivec3(1); 2254 vec3 cell_cos = clamp(localpos_floored + vec3(offset), vec3(0.0), vec3(gd.g_resolution) - 1.0); 2255 2256 /* Keep in sync with update_irradiance_probe */ 2257 ivec3 icell_cos = ivec3(gd.g_level_bias * floor(cell_cos / gd.g_level_bias)); 2258 int cell = gd.g_offset + icell_cos.z + icell_cos.y * gd.g_resolution.z + 2259 icell_cos.x * gd.g_resolution.z * gd.g_resolution.y; 2260 2261 vec3 color = irradiance_from_cell_get(cell, N); 2262 2263 /* We need this because we render probes in world space (so we need light vector in WS). 2264 * And rendering them in local probe space is too much problem. */ 2265 vec3 ws_cell_location = gd.g_corner + 2266 (gd.g_increment_x * cell_cos.x + gd.g_increment_y * cell_cos.y + 2267 gd.g_increment_z * cell_cos.z); 2268 2269 vec3 ws_point_to_cell = ws_cell_location - W; 2270 float ws_dist_point_to_cell = length(ws_point_to_cell); 2271 vec3 ws_light = ws_point_to_cell / ws_dist_point_to_cell; 2272 2273 /* Smooth backface test */ 2274 float weight = saturate(dot(ws_light, N)); 2275 2276 /* Precomputed visibility */ 2277 weight *= load_visibility_cell( 2278 cell, ws_light, ws_dist_point_to_cell, gd.g_vis_bias, gd.g_vis_bleed, gd.g_vis_range); 2279 2280 /* Smoother transition */ 2281 weight += prbIrradianceSmooth; 2282 2283 /* Trilinear weights */ 2284 vec3 trilinear = mix(1.0 - trilinear_weight, trilinear_weight, offset); 2285 weight *= trilinear.x * trilinear.y * trilinear.z; 2286 2287 /* Avoid zero weight */ 2288 weight = max(0.00001, weight); 2289 2290 weight_accum += weight; 2291 irradiance_accum += color * weight; 2292 } 2293 2294 return irradiance_accum / weight_accum; 2295 } 2296 2297 vec3 probe_evaluate_world_diff(vec3 N) 2298 { 2299 return irradiance_from_cell_get(0, N); 2300 } 2301 2302 #endif /* IRRADIANCE_LIB */ 2303 /** 2304 * Adapted from : 2305 * Real-Time Polygonal-Light Shading with Linearly Transformed Cosines. 2306 * Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt. 2307 * ACM Transactions on Graphics (Proceedings of ACM SIGGRAPH 2016) 35(4), 2016. 2308 * Project page: https://eheitzresearch.wordpress.com/415-2/ 2309 */ 2310 2311 #define USE_LTC 2312 2313 #ifndef UTIL_TEX 2314 # define UTIL_TEX 2315 uniform sampler2DArray utilTex; 2316 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 2317 #endif /* UTIL_TEX */ 2318 2319 /* Diffuse *clipped* sphere integral. */ 2320 float diffuse_sphere_integral(float avg_dir_z, float form_factor) 2321 { 2322 #if 1 2323 /* use tabulated horizon-clipped sphere */ 2324 vec2 uv = vec2(avg_dir_z * 0.5 + 0.5, form_factor); 2325 uv = uv * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 2326 2327 return texture(utilTex, vec3(uv, 3.0)).x; 2328 #else 2329 /* Cheap approximation. Less smooth and have energy issues. */ 2330 return max((form_factor * form_factor + avg_dir_z) / (form_factor + 1.0), 0.0); 2331 #endif 2332 } 2333 2334 /** 2335 * An extended version of the implementation from 2336 * "How to solve a cubic equation, revisited" 2337 * http://momentsingraphics.de/?p=105 2338 */ 2339 vec3 solve_cubic(vec4 coefs) 2340 { 2341 /* Normalize the polynomial */ 2342 coefs.xyz /= coefs.w; 2343 /* Divide middle coefficients by three */ 2344 coefs.yz /= 3.0; 2345 2346 float A = coefs.w; 2347 float B = coefs.z; 2348 float C = coefs.y; 2349 float D = coefs.x; 2350 2351 /* Compute the Hessian and the discriminant */ 2352 vec3 delta = vec3(-coefs.z * coefs.z + coefs.y, 2353 -coefs.y * coefs.z + coefs.x, 2354 dot(vec2(coefs.z, -coefs.y), coefs.xy)); 2355 2356 /* Discriminant */ 2357 float discr = dot(vec2(4.0 * delta.x, -delta.y), delta.zy); 2358 2359 vec2 xlc, xsc; 2360 2361 /* Algorithm A */ 2362 { 2363 float A_a = 1.0; 2364 float C_a = delta.x; 2365 float D_a = -2.0 * B * delta.x + delta.y; 2366 2367 /* Take the cubic root of a normalized complex number */ 2368 float theta = atan(sqrt(discr), -D_a) / 3.0; 2369 2370 float x_1a = 2.0 * sqrt(-C_a) * cos(theta); 2371 float x_3a = 2.0 * sqrt(-C_a) * cos(theta + (2.0 / 3.0) * M_PI); 2372 2373 float xl; 2374 if ((x_1a + x_3a) > 2.0 * B) { 2375 xl = x_1a; 2376 } 2377 else { 2378 xl = x_3a; 2379 } 2380 2381 xlc = vec2(xl - B, A); 2382 } 2383 2384 /* Algorithm D */ 2385 { 2386 float A_d = D; 2387 float C_d = delta.z; 2388 float D_d = -D * delta.y + 2.0 * C * delta.z; 2389 2390 /* Take the cubic root of a normalized complex number */ 2391 float theta = atan(D * sqrt(discr), -D_d) / 3.0; 2392 2393 float x_1d = 2.0 * sqrt(-C_d) * cos(theta); 2394 float x_3d = 2.0 * sqrt(-C_d) * cos(theta + (2.0 / 3.0) * M_PI); 2395 2396 float xs; 2397 if (x_1d + x_3d < 2.0 * C) { 2398 xs = x_1d; 2399 } 2400 else { 2401 xs = x_3d; 2402 } 2403 2404 xsc = vec2(-D, xs + C); 2405 } 2406 2407 float E = xlc.y * xsc.y; 2408 float F = -xlc.x * xsc.y - xlc.y * xsc.x; 2409 float G = xlc.x * xsc.x; 2410 2411 vec2 xmc = vec2(C * F - B * G, -B * F + C * E); 2412 2413 vec3 root = vec3(xsc.x / xsc.y, xmc.x / xmc.y, xlc.x / xlc.y); 2414 2415 if (root.x < root.y && root.x < root.z) { 2416 root.xyz = root.yxz; 2417 } 2418 else if (root.z < root.x && root.z < root.y) { 2419 root.xyz = root.xzy; 2420 } 2421 2422 return root; 2423 } 2424 2425 /* from Real-Time Area Lighting: a Journey from Research to Production 2426 * Stephen Hill and Eric Heitz */ 2427 vec3 edge_integral_vec(vec3 v1, vec3 v2) 2428 { 2429 float x = dot(v1, v2); 2430 float y = abs(x); 2431 2432 float a = 0.8543985 + (0.4965155 + 0.0145206 * y) * y; 2433 float b = 3.4175940 + (4.1616724 + y) * y; 2434 float v = a / b; 2435 2436 float theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt(max(1.0 - x * x, 1e-7)) - v; 2437 2438 return cross(v1, v2) * theta_sintheta; 2439 } 2440 2441 mat3 ltc_matrix(vec4 lut) 2442 { 2443 /* load inverse matrix */ 2444 mat3 Minv = mat3(vec3(lut.x, 0, lut.y), vec3(0, 1, 0), vec3(lut.z, 0, lut.w)); 2445 2446 return Minv; 2447 } 2448 2449 void ltc_transform_quad(vec3 N, vec3 V, mat3 Minv, inout vec3 corners[4]) 2450 { 2451 /* Avoid dot(N, V) == 1 in ortho mode, leading T1 normalize to fail. */ 2452 V = normalize(V + 1e-8); 2453 2454 /* construct orthonormal basis around N */ 2455 vec3 T1, T2; 2456 T1 = normalize(V - N * dot(N, V)); 2457 T2 = cross(N, T1); 2458 2459 /* rotate area light in (T1, T2, R) basis */ 2460 Minv = Minv * transpose(mat3(T1, T2, N)); 2461 2462 /* Apply LTC inverse matrix. */ 2463 corners[0] = normalize(Minv * corners[0]); 2464 corners[1] = normalize(Minv * corners[1]); 2465 corners[2] = normalize(Minv * corners[2]); 2466 corners[3] = normalize(Minv * corners[3]); 2467 } 2468 2469 /* If corners have already pass through ltc_transform_quad(), then N **MUST** be vec3(0.0, 0.0, 1.0), 2470 * corresponding to the Up axis of the shading basis. */ 2471 float ltc_evaluate_quad(vec3 corners[4], vec3 N) 2472 { 2473 /* Approximation using a sphere of the same solid angle than the quad. 2474 * Finding the clipped sphere diffuse integral is easier than clipping the quad. */ 2475 vec3 avg_dir; 2476 avg_dir = edge_integral_vec(corners[0], corners[1]); 2477 avg_dir += edge_integral_vec(corners[1], corners[2]); 2478 avg_dir += edge_integral_vec(corners[2], corners[3]); 2479 avg_dir += edge_integral_vec(corners[3], corners[0]); 2480 2481 float form_factor = length(avg_dir); 2482 float avg_dir_z = dot(N, avg_dir / form_factor); 2483 return form_factor * diffuse_sphere_integral(avg_dir_z, form_factor); 2484 } 2485 2486 /* If disk does not need to be transformed and is already front facing. */ 2487 float ltc_evaluate_disk_simple(float disk_radius, float NL) 2488 { 2489 float r_sqr = disk_radius * disk_radius; 2490 float one_r_sqr = 1.0 + r_sqr; 2491 float form_factor = r_sqr * inversesqrt(one_r_sqr * one_r_sqr); 2492 return form_factor * diffuse_sphere_integral(NL, form_factor); 2493 } 2494 2495 /* disk_points are WS vectors from the shading point to the disk "bounding domain" */ 2496 float ltc_evaluate_disk(vec3 N, vec3 V, mat3 Minv, vec3 disk_points[3]) 2497 { 2498 /* Avoid dot(N, V) == 1 in ortho mode, leading T1 normalize to fail. */ 2499 V = normalize(V + 1e-8); 2500 2501 /* construct orthonormal basis around N */ 2502 vec3 T1, T2; 2503 T1 = normalize(V - N * dot(V, N)); 2504 T2 = cross(N, T1); 2505 2506 /* rotate area light in (T1, T2, R) basis */ 2507 mat3 R = transpose(mat3(T1, T2, N)); 2508 2509 /* Intermediate step: init ellipse. */ 2510 vec3 L_[3]; 2511 L_[0] = mul(R, disk_points[0]); 2512 L_[1] = mul(R, disk_points[1]); 2513 L_[2] = mul(R, disk_points[2]); 2514 2515 vec3 C = 0.5 * (L_[0] + L_[2]); 2516 vec3 V1 = 0.5 * (L_[1] - L_[2]); 2517 vec3 V2 = 0.5 * (L_[1] - L_[0]); 2518 2519 /* Transform ellipse by Minv. */ 2520 C = Minv * C; 2521 V1 = Minv * V1; 2522 V2 = Minv * V2; 2523 2524 /* Compute eigenvectors of new ellipse. */ 2525 2526 float d11 = dot(V1, V1); 2527 float d22 = dot(V2, V2); 2528 float d12 = dot(V1, V2); 2529 float a, b; /* Eigenvalues */ 2530 const float threshold = 0.0007; /* Can be adjusted. Fix artifacts. */ 2531 if (abs(d12) / sqrt(d11 * d22) > threshold) { 2532 float tr = d11 + d22; 2533 float det = -d12 * d12 + d11 * d22; 2534 2535 /* use sqrt matrix to solve for eigenvalues */ 2536 det = sqrt(det); 2537 float u = 0.5 * sqrt(tr - 2.0 * det); 2538 float v = 0.5 * sqrt(tr + 2.0 * det); 2539 float e_max = (u + v); 2540 float e_min = (u - v); 2541 e_max *= e_max; 2542 e_min *= e_min; 2543 2544 vec3 V1_, V2_; 2545 if (d11 > d22) { 2546 V1_ = d12 * V1 + (e_max - d11) * V2; 2547 V2_ = d12 * V1 + (e_min - d11) * V2; 2548 } 2549 else { 2550 V1_ = d12 * V2 + (e_max - d22) * V1; 2551 V2_ = d12 * V2 + (e_min - d22) * V1; 2552 } 2553 2554 a = 1.0 / e_max; 2555 b = 1.0 / e_min; 2556 V1 = normalize(V1_); 2557 V2 = normalize(V2_); 2558 } 2559 else { 2560 a = 1.0 / d11; 2561 b = 1.0 / d22; 2562 V1 *= sqrt(a); 2563 V2 *= sqrt(b); 2564 } 2565 2566 /* Now find front facing ellipse with same solid angle. */ 2567 2568 vec3 V3 = normalize(cross(V1, V2)); 2569 if (dot(C, V3) < 0.0) { 2570 V3 *= -1.0; 2571 } 2572 2573 float L = dot(V3, C); 2574 float x0 = dot(V1, C) / L; 2575 float y0 = dot(V2, C) / L; 2576 2577 a *= L * L; 2578 b *= L * L; 2579 2580 float c0 = a * b; 2581 float c1 = a * b * (1.0 + x0 * x0 + y0 * y0) - a - b; 2582 float c2 = 1.0 - a * (1.0 + x0 * x0) - b * (1.0 + y0 * y0); 2583 float c3 = 1.0; 2584 2585 vec3 roots = solve_cubic(vec4(c0, c1, c2, c3)); 2586 float e1 = roots.x; 2587 float e2 = roots.y; 2588 float e3 = roots.z; 2589 2590 vec3 avg_dir = vec3(a * x0 / (a - e2), b * y0 / (b - e2), 1.0); 2591 2592 mat3 rotate = mat3(V1, V2, V3); 2593 2594 avg_dir = rotate * avg_dir; 2595 avg_dir = normalize(avg_dir); 2596 2597 /* L1, L2 are the extends of the front facing ellipse. */ 2598 float L1 = sqrt(-e2 / e3); 2599 float L2 = sqrt(-e2 / e1); 2600 2601 /* Find the sphere and compute lighting. */ 2602 float form_factor = max(0.0, L1 * L2 * inversesqrt((1.0 + L1 * L1) * (1.0 + L2 * L2))); 2603 return form_factor * diffuse_sphere_integral(avg_dir.z, form_factor); 2604 } 2605 2606 uniform sampler2DArray shadowCubeTexture; 2607 uniform sampler2DArray shadowCascadeTexture; 2608 2609 #define LAMPS_LIB 2610 2611 layout(std140) uniform shadow_block 2612 { 2613 ShadowData shadows_data[MAX_SHADOW]; 2614 ShadowCubeData shadows_cube_data[MAX_SHADOW_CUBE]; 2615 ShadowCascadeData shadows_cascade_data[MAX_SHADOW_CASCADE]; 2616 }; 2617 2618 layout(std140) uniform light_block 2619 { 2620 LightData lights_data[MAX_LIGHT]; 2621 }; 2622 2623 /* type */ 2624 #define POINT 0.0 2625 #define SUN 1.0 2626 #define SPOT 2.0 2627 #define AREA_RECT 4.0 2628 /* Used to define the area light shape, doesn't directly correspond to a Blender light type. */ 2629 #define AREA_ELLIPSE 100.0 2630 2631 #if defined(SHADOW_VSM) 2632 # define ShadowSample vec2 2633 # define sample_cube(vec, id) texture_octahedron(shadowCubeTexture, vec4(vec, id)).rg 2634 # define sample_cascade(vec, id) texture(shadowCascadeTexture, vec3(vec, id)).rg 2635 #elif defined(SHADOW_ESM) 2636 # define ShadowSample float 2637 # define sample_cube(vec, id) texture_octahedron(shadowCubeTexture, vec4(vec, id)).r 2638 # define sample_cascade(vec, id) texture(shadowCascadeTexture, vec3(vec, id)).r 2639 #else 2640 # define ShadowSample float 2641 # define sample_cube(vec, id) texture_octahedron(shadowCubeTexture, vec4(vec, id)).r 2642 # define sample_cascade(vec, id) texture(shadowCascadeTexture, vec3(vec, id)).r 2643 #endif 2644 2645 #if defined(SHADOW_VSM) 2646 # define get_depth_delta(dist, s) (dist - s.x) 2647 #else 2648 # define get_depth_delta(dist, s) (dist - s) 2649 #endif 2650 2651 /* ----------------------------------------------------------- */ 2652 /* ----------------------- Shadow tests ---------------------- */ 2653 /* ----------------------------------------------------------- */ 2654 2655 #if defined(SHADOW_VSM) 2656 2657 float shadow_test(ShadowSample moments, float dist, ShadowData sd) 2658 { 2659 float p = 0.0; 2660 2661 if (dist <= moments.x) { 2662 p = 1.0; 2663 } 2664 2665 float variance = moments.y - (moments.x * moments.x); 2666 variance = max(variance, sd.sh_bias / 10.0); 2667 2668 float d = moments.x - dist; 2669 float p_max = variance / (variance + d * d); 2670 2671 /* Now reduce light-bleeding by removing the [0, x] tail and linearly rescaling (x, 1] */ 2672 p_max = clamp((p_max - sd.sh_bleed) / (1.0 - sd.sh_bleed), 0.0, 1.0); 2673 2674 return max(p, p_max); 2675 } 2676 2677 #elif defined(SHADOW_ESM) 2678 2679 float shadow_test(ShadowSample z, float dist, ShadowData sd) 2680 { 2681 return saturate(exp(sd.sh_exp * (z - dist + sd.sh_bias))); 2682 } 2683 2684 #else 2685 2686 float shadow_test(ShadowSample z, float dist, ShadowData sd) 2687 { 2688 return step(0, z - dist + sd.sh_bias); 2689 } 2690 2691 #endif 2692 2693 /* ----------------------------------------------------------- */ 2694 /* ----------------------- Shadow types ---------------------- */ 2695 /* ----------------------------------------------------------- */ 2696 2697 float shadow_cubemap(ShadowData sd, ShadowCubeData scd, float texid, vec3 W) 2698 { 2699 vec3 cubevec = W - scd.position.xyz; 2700 float dist = length(cubevec); 2701 2702 cubevec /= dist; 2703 2704 ShadowSample s = sample_cube(cubevec, texid); 2705 return shadow_test(s, dist, sd); 2706 } 2707 2708 float evaluate_cascade(ShadowData sd, mat4 shadowmat, vec3 W, float range, float texid) 2709 { 2710 vec4 shpos = shadowmat * vec4(W, 1.0); 2711 float dist = shpos.z * range; 2712 2713 ShadowSample s = sample_cascade(shpos.xy, texid); 2714 float vis = shadow_test(s, dist, sd); 2715 2716 /* If fragment is out of shadowmap range, do not occlude */ 2717 if (shpos.z < 1.0 && shpos.z > 0.0) { 2718 return vis; 2719 } 2720 else { 2721 return 1.0; 2722 } 2723 } 2724 2725 float shadow_cascade(ShadowData sd, int scd_id, float texid, vec3 W) 2726 { 2727 vec4 view_z = vec4(dot(W - cameraPos, cameraForward)); 2728 vec4 weights = smoothstep(shadows_cascade_data[scd_id].split_end_distances, 2729 shadows_cascade_data[scd_id].split_start_distances.yzwx, 2730 view_z); 2731 2732 weights.yzw -= weights.xyz; 2733 2734 vec4 vis = vec4(1.0); 2735 float range = abs(sd.sh_far - sd.sh_near); /* Same factor as in get_cascade_world_distance(). */ 2736 2737 /* Branching using (weights > 0.0) is reaally slooow on intel so avoid it for now. */ 2738 /* TODO OPTI: Only do 2 samples and blend. */ 2739 vis.x = evaluate_cascade(sd, shadows_cascade_data[scd_id].shadowmat[0], W, range, texid + 0); 2740 vis.y = evaluate_cascade(sd, shadows_cascade_data[scd_id].shadowmat[1], W, range, texid + 1); 2741 vis.z = evaluate_cascade(sd, shadows_cascade_data[scd_id].shadowmat[2], W, range, texid + 2); 2742 vis.w = evaluate_cascade(sd, shadows_cascade_data[scd_id].shadowmat[3], W, range, texid + 3); 2743 2744 float weight_sum = dot(vec4(1.0), weights); 2745 if (weight_sum > 0.9999) { 2746 float vis_sum = dot(vec4(1.0), vis * weights); 2747 return vis_sum / weight_sum; 2748 } 2749 else { 2750 float vis_sum = dot(vec4(1.0), vis * step(0.001, weights)); 2751 return mix(1.0, vis_sum, weight_sum); 2752 } 2753 } 2754 2755 /* ----------------------------------------------------------- */ 2756 /* --------------------- Light Functions --------------------- */ 2757 /* ----------------------------------------------------------- */ 2758 2759 /* From Frostbite PBR Course 2760 * Distance based attenuation 2761 * http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf */ 2762 float distance_attenuation(float dist_sqr, float inv_sqr_influence) 2763 { 2764 float factor = dist_sqr * inv_sqr_influence; 2765 float fac = saturate(1.0 - factor * factor); 2766 return fac * fac; 2767 } 2768 2769 float spot_attenuation(LightData ld, vec3 l_vector) 2770 { 2771 float z = dot(ld.l_forward, l_vector.xyz); 2772 vec3 lL = l_vector.xyz / z; 2773 float x = dot(ld.l_right, lL) / ld.l_sizex; 2774 float y = dot(ld.l_up, lL) / ld.l_sizey; 2775 float ellipse = inversesqrt(1.0 + x * x + y * y); 2776 float spotmask = smoothstep(0.0, 1.0, (ellipse - ld.l_spot_size) / ld.l_spot_blend); 2777 return spotmask; 2778 } 2779 2780 float light_visibility(LightData ld, 2781 vec3 W, 2782 #ifndef VOLUMETRICS 2783 vec3 viewPosition, 2784 vec3 viewNormal, 2785 #endif 2786 vec4 l_vector) 2787 { 2788 float vis = 1.0; 2789 2790 if (ld.l_type == SPOT) { 2791 vis *= spot_attenuation(ld, l_vector.xyz); 2792 } 2793 if (ld.l_type >= SPOT) { 2794 vis *= step(0.0, -dot(l_vector.xyz, ld.l_forward)); 2795 } 2796 if (ld.l_type != SUN) { 2797 vis *= distance_attenuation(l_vector.w * l_vector.w, ld.l_influence); 2798 } 2799 2800 #if !defined(VOLUMETRICS) || defined(VOLUME_SHADOW) 2801 /* shadowing */ 2802 if (ld.l_shadowid >= 0.0 && vis > 0.001) { 2803 ShadowData data = shadows_data[int(ld.l_shadowid)]; 2804 2805 if (ld.l_type == SUN) { 2806 vis *= shadow_cascade(data, int(data.sh_data_start), data.sh_tex_start, W); 2807 } 2808 else { 2809 vis *= shadow_cubemap( 2810 data, shadows_cube_data[int(data.sh_data_start)], data.sh_tex_start, W); 2811 } 2812 2813 # ifndef VOLUMETRICS 2814 /* Only compute if not already in shadow. */ 2815 if (data.sh_contact_dist > 0.0) { 2816 vec4 L = (ld.l_type != SUN) ? l_vector : vec4(-ld.l_forward, 1.0); 2817 float trace_distance = (ld.l_type != SUN) ? min(data.sh_contact_dist, l_vector.w) : 2818 data.sh_contact_dist; 2819 2820 vec3 T, B; 2821 make_orthonormal_basis(L.xyz / L.w, T, B); 2822 2823 vec4 rand = texelfetch_noise_tex(gl_FragCoord.xy); 2824 rand.zw *= fast_sqrt(rand.y) * data.sh_contact_spread; 2825 2826 /* We use the full l_vector.xyz so that the spread is minimize 2827 * if the shading point is further away from the light source */ 2828 vec3 ray_dir = L.xyz + T * rand.z + B * rand.w; 2829 ray_dir = transform_direction(ViewMatrix, ray_dir); 2830 ray_dir = normalize(ray_dir); 2831 2832 vec3 ray_ori = viewPosition; 2833 2834 if (dot(viewNormal, ray_dir) <= 0.0) { 2835 return vis; 2836 } 2837 2838 float bias = 0.5; /* Constant Bias */ 2839 bias += 1.0 - abs(dot(viewNormal, ray_dir)); /* Angle dependent bias */ 2840 bias *= gl_FrontFacing ? data.sh_contact_offset : -data.sh_contact_offset; 2841 2842 vec3 nor_bias = viewNormal * bias; 2843 ray_ori += nor_bias; 2844 2845 ray_dir *= trace_distance; 2846 ray_dir -= nor_bias; 2847 2848 vec3 hit_pos = raycast( 2849 -1, ray_ori, ray_dir, data.sh_contact_thickness, rand.x, 0.1, 0.001, false); 2850 2851 if (hit_pos.z > 0.0) { 2852 hit_pos = get_view_space_from_depth(hit_pos.xy, hit_pos.z); 2853 float hit_dist = distance(viewPosition, hit_pos); 2854 float dist_ratio = hit_dist / trace_distance; 2855 return vis * saturate(dist_ratio * dist_ratio * dist_ratio); 2856 } 2857 } 2858 # endif 2859 } 2860 #endif 2861 2862 return vis; 2863 } 2864 2865 #ifdef USE_LTC 2866 float light_diffuse(LightData ld, vec3 N, vec3 V, vec4 l_vector) 2867 { 2868 if (ld.l_type == AREA_RECT) { 2869 vec3 corners[4]; 2870 corners[0] = normalize((l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * ld.l_sizey); 2871 corners[1] = normalize((l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * -ld.l_sizey); 2872 corners[2] = normalize((l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * -ld.l_sizey); 2873 corners[3] = normalize((l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * ld.l_sizey); 2874 2875 return ltc_evaluate_quad(corners, N); 2876 } 2877 else if (ld.l_type == AREA_ELLIPSE) { 2878 vec3 points[3]; 2879 points[0] = (l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * -ld.l_sizey; 2880 points[1] = (l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * -ld.l_sizey; 2881 points[2] = (l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * ld.l_sizey; 2882 2883 return ltc_evaluate_disk(N, V, mat3(1.0), points); 2884 } 2885 else { 2886 float radius = ld.l_radius; 2887 radius /= (ld.l_type == SUN) ? 1.0 : l_vector.w; 2888 vec3 L = (ld.l_type == SUN) ? -ld.l_forward : (l_vector.xyz / l_vector.w); 2889 2890 return ltc_evaluate_disk_simple(radius, dot(N, L)); 2891 } 2892 } 2893 2894 float light_specular(LightData ld, vec4 ltc_mat, vec3 N, vec3 V, vec4 l_vector) 2895 { 2896 if (ld.l_type == AREA_RECT) { 2897 vec3 corners[4]; 2898 corners[0] = (l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * ld.l_sizey; 2899 corners[1] = (l_vector.xyz + ld.l_right * -ld.l_sizex) + ld.l_up * -ld.l_sizey; 2900 corners[2] = (l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * -ld.l_sizey; 2901 corners[3] = (l_vector.xyz + ld.l_right * ld.l_sizex) + ld.l_up * ld.l_sizey; 2902 2903 ltc_transform_quad(N, V, ltc_matrix(ltc_mat), corners); 2904 2905 return ltc_evaluate_quad(corners, vec3(0.0, 0.0, 1.0)); 2906 } 2907 else { 2908 bool is_ellipse = (ld.l_type == AREA_ELLIPSE); 2909 float radius_x = is_ellipse ? ld.l_sizex : ld.l_radius; 2910 float radius_y = is_ellipse ? ld.l_sizey : ld.l_radius; 2911 2912 vec3 L = (ld.l_type == SUN) ? -ld.l_forward : l_vector.xyz; 2913 vec3 Px = ld.l_right; 2914 vec3 Py = ld.l_up; 2915 2916 if (ld.l_type == SPOT || ld.l_type == POINT) { 2917 make_orthonormal_basis(l_vector.xyz / l_vector.w, Px, Py); 2918 } 2919 2920 vec3 points[3]; 2921 points[0] = (L + Px * -radius_x) + Py * -radius_y; 2922 points[1] = (L + Px * radius_x) + Py * -radius_y; 2923 points[2] = (L + Px * radius_x) + Py * radius_y; 2924 2925 return ltc_evaluate_disk(N, V, ltc_matrix(ltc_mat), points); 2926 } 2927 } 2928 #endif 2929 2930 #define MAX_SSS_SAMPLES 65 2931 #define SSS_LUT_SIZE 64.0 2932 #define SSS_LUT_SCALE ((SSS_LUT_SIZE - 1.0) / float(SSS_LUT_SIZE)) 2933 #define SSS_LUT_BIAS (0.5 / float(SSS_LUT_SIZE)) 2934 2935 #ifdef USE_TRANSLUCENCY 2936 layout(std140) uniform sssProfile 2937 { 2938 vec4 kernel[MAX_SSS_SAMPLES]; 2939 vec4 radii_max_radius; 2940 int sss_samples; 2941 }; 2942 2943 uniform sampler1D sssTexProfile; 2944 2945 vec3 sss_profile(float s) 2946 { 2947 s /= radii_max_radius.w; 2948 return texture(sssTexProfile, saturate(s) * SSS_LUT_SCALE + SSS_LUT_BIAS).rgb; 2949 } 2950 #endif 2951 2952 vec3 light_translucent(LightData ld, vec3 W, vec3 N, vec4 l_vector, float scale) 2953 { 2954 #if !defined(USE_TRANSLUCENCY) || defined(VOLUMETRICS) 2955 return vec3(0.0); 2956 #else 2957 vec3 vis = vec3(1.0); 2958 2959 if (ld.l_type == SPOT) { 2960 vis *= spot_attenuation(ld, l_vector.xyz); 2961 } 2962 if (ld.l_type >= SPOT) { 2963 vis *= step(0.0, -dot(l_vector.xyz, ld.l_forward)); 2964 } 2965 if (ld.l_type != SUN) { 2966 vis *= distance_attenuation(l_vector.w * l_vector.w, ld.l_influence); 2967 } 2968 2969 /* Only shadowed light can produce translucency */ 2970 if (ld.l_shadowid >= 0.0 && vis.x > 0.001) { 2971 ShadowData data = shadows_data[int(ld.l_shadowid)]; 2972 float delta; 2973 2974 vec4 L = (ld.l_type != SUN) ? l_vector : vec4(-ld.l_forward, 1.0); 2975 2976 vec3 T, B; 2977 make_orthonormal_basis(L.xyz / L.w, T, B); 2978 2979 vec4 rand = texelfetch_noise_tex(gl_FragCoord.xy); 2980 rand.zw *= fast_sqrt(rand.y) * data.sh_blur; 2981 2982 /* We use the full l_vector.xyz so that the spread is minimize 2983 * if the shading point is further away from the light source */ 2984 W = W + T * rand.z + B * rand.w; 2985 2986 if (ld.l_type == SUN) { 2987 int scd_id = int(data.sh_data_start); 2988 vec4 view_z = vec4(dot(W - cameraPos, cameraForward)); 2989 2990 vec4 weights = step(shadows_cascade_data[scd_id].split_end_distances, view_z); 2991 float id = abs(4.0 - dot(weights, weights)); 2992 2993 if (id > 3.0) { 2994 return vec3(0.0); 2995 } 2996 2997 float range = abs(data.sh_far - 2998 data.sh_near); /* Same factor as in get_cascade_world_distance(). */ 2999 3000 vec4 shpos = shadows_cascade_data[scd_id].shadowmat[int(id)] * vec4(W, 1.0); 3001 float dist = shpos.z * range; 3002 3003 if (shpos.z > 1.0 || shpos.z < 0.0) { 3004 return vec3(0.0); 3005 } 3006 3007 ShadowSample s = sample_cascade(shpos.xy, data.sh_tex_start + id); 3008 delta = get_depth_delta(dist, s); 3009 } 3010 else { 3011 vec3 cubevec = W - shadows_cube_data[int(data.sh_data_start)].position.xyz; 3012 float dist = length(cubevec); 3013 cubevec /= dist; 3014 3015 ShadowSample s = sample_cube(cubevec, data.sh_tex_start); 3016 delta = get_depth_delta(dist, s); 3017 } 3018 3019 /* XXX : Removing Area Power. */ 3020 /* TODO : put this out of the shader. */ 3021 float falloff; 3022 if (ld.l_type == AREA_RECT || ld.l_type == AREA_ELLIPSE) { 3023 vis *= (ld.l_sizex * ld.l_sizey * 4.0 * M_PI) * (1.0 / 80.0); 3024 if (ld.l_type == AREA_ELLIPSE) { 3025 vis *= M_PI * 0.25; 3026 } 3027 vis *= 0.3 * 20.0 * 3028 max(0.0, dot(-ld.l_forward, l_vector.xyz / l_vector.w)); /* XXX ad hoc, empirical */ 3029 vis /= (l_vector.w * l_vector.w); 3030 falloff = dot(N, l_vector.xyz / l_vector.w); 3031 } 3032 else if (ld.l_type == SUN) { 3033 vis /= 1.0f + (ld.l_radius * ld.l_radius * 0.5f); 3034 vis *= ld.l_radius * ld.l_radius * M_PI; /* Removing area light power*/ 3035 vis *= M_2PI * 0.78; /* Matching cycles with point light. */ 3036 vis *= 0.082; /* XXX ad hoc, empirical */ 3037 falloff = dot(N, -ld.l_forward); 3038 } 3039 else { 3040 vis *= (4.0 * ld.l_radius * ld.l_radius) * (1.0 / 10.0); 3041 vis *= 1.5; /* XXX ad hoc, empirical */ 3042 vis /= (l_vector.w * l_vector.w); 3043 falloff = dot(N, l_vector.xyz / l_vector.w); 3044 } 3045 // vis *= M_1_PI; /* Normalize */ 3046 3047 /* Applying profile */ 3048 vis *= sss_profile(abs(delta) / scale); 3049 3050 /* No transmittance at grazing angle (hide artifacts) */ 3051 vis *= saturate(falloff * 2.0); 3052 } 3053 else { 3054 vis = vec3(0.0); 3055 } 3056 3057 return vis; 3058 #endif 3059 } 3060 3061 #ifndef LIT_SURFACE_UNIFORM 3062 #define LIT_SURFACE_UNIFORM 3063 3064 uniform float refractionDepth; 3065 3066 #ifndef UTIL_TEX 3067 # define UTIL_TEX 3068 uniform sampler2DArray utilTex; 3069 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 3070 #endif /* UTIL_TEX */ 3071 3072 in vec3 worldPosition; 3073 in vec3 viewPosition; 3074 3075 #ifdef USE_FLAT_NORMAL 3076 flat in vec3 worldNormal; 3077 flat in vec3 viewNormal; 3078 #else 3079 in vec3 worldNormal; 3080 in vec3 viewNormal; 3081 #endif 3082 3083 #ifdef HAIR_SHADER 3084 in vec3 hairTangent; /* world space */ 3085 in float hairThickTime; 3086 in float hairThickness; 3087 in float hairTime; 3088 flat in int hairStrandID; 3089 3090 uniform int hairThicknessRes = 1; 3091 #endif 3092 3093 #endif /* LIT_SURFACE_UNIFORM */ 3094 3095 /** AUTO CONFIG 3096 * We include the file multiple times each time with a different configuration. 3097 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 3098 */ 3099 #if !defined(SURFACE_DEFAULT) 3100 #define SURFACE_DEFAULT 3101 #define CLOSURE_NAME eevee_closure_default 3102 #define CLOSURE_DIFFUSE 3103 #define CLOSURE_GLOSSY 3104 #endif /* SURFACE_DEFAULT */ 3105 3106 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 3107 #define SURFACE_PRINCIPLED 3108 #define CLOSURE_NAME eevee_closure_principled 3109 #define CLOSURE_DIFFUSE 3110 #define CLOSURE_GLOSSY 3111 #define CLOSURE_CLEARCOAT 3112 #define CLOSURE_REFRACTION 3113 #define CLOSURE_SUBSURFACE 3114 #endif /* SURFACE_PRINCIPLED */ 3115 3116 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 3117 #define SURFACE_CLEARCOAT 3118 #define CLOSURE_NAME eevee_closure_clearcoat 3119 #define CLOSURE_GLOSSY 3120 #define CLOSURE_CLEARCOAT 3121 #endif /* SURFACE_CLEARCOAT */ 3122 3123 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 3124 #define SURFACE_DIFFUSE 3125 #define CLOSURE_NAME eevee_closure_diffuse 3126 #define CLOSURE_DIFFUSE 3127 #endif /* SURFACE_DIFFUSE */ 3128 3129 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 3130 #define SURFACE_SUBSURFACE 3131 #define CLOSURE_NAME eevee_closure_subsurface 3132 #define CLOSURE_DIFFUSE 3133 #define CLOSURE_SUBSURFACE 3134 #endif /* SURFACE_SUBSURFACE */ 3135 3136 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 3137 #define SURFACE_SKIN 3138 #define CLOSURE_NAME eevee_closure_skin 3139 #define CLOSURE_DIFFUSE 3140 #define CLOSURE_SUBSURFACE 3141 #define CLOSURE_GLOSSY 3142 #endif /* SURFACE_SKIN */ 3143 3144 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 3145 #define SURFACE_GLOSSY 3146 #define CLOSURE_NAME eevee_closure_glossy 3147 #define CLOSURE_GLOSSY 3148 #endif /* SURFACE_GLOSSY */ 3149 3150 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 3151 #define SURFACE_REFRACT 3152 #define CLOSURE_NAME eevee_closure_refraction 3153 #define CLOSURE_REFRACTION 3154 #endif /* SURFACE_REFRACT */ 3155 3156 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 3157 #define SURFACE_GLASS 3158 #define CLOSURE_NAME eevee_closure_glass 3159 #define CLOSURE_GLOSSY 3160 #define CLOSURE_REFRACTION 3161 #endif /* SURFACE_GLASS */ 3162 3163 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 3164 #ifdef CLOSURE_CLEARCOAT 3165 #ifndef CLOSURE_GLOSSY 3166 # define CLOSURE_GLOSSY 3167 #endif 3168 #endif /* CLOSURE_CLEARCOAT */ 3169 3170 void CLOSURE_NAME(vec3 N 3171 #ifdef CLOSURE_DIFFUSE 3172 , 3173 vec3 albedo 3174 #endif 3175 #ifdef CLOSURE_GLOSSY 3176 , 3177 vec3 f0, 3178 int ssr_id 3179 #endif 3180 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3181 , 3182 float roughness 3183 #endif 3184 #ifdef CLOSURE_CLEARCOAT 3185 , 3186 vec3 C_N, 3187 float C_intensity, 3188 float C_roughness 3189 #endif 3190 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 3191 , 3192 float ao 3193 #endif 3194 #ifdef CLOSURE_SUBSURFACE 3195 , 3196 float sss_scale 3197 #endif 3198 #ifdef CLOSURE_REFRACTION 3199 , 3200 float ior 3201 #endif 3202 #ifdef CLOSURE_DIFFUSE 3203 , 3204 out vec3 out_diff 3205 #endif 3206 #ifdef CLOSURE_SUBSURFACE 3207 , 3208 out vec3 out_trans 3209 #endif 3210 #ifdef CLOSURE_GLOSSY 3211 , 3212 out vec3 out_spec 3213 #endif 3214 #ifdef CLOSURE_REFRACTION 3215 , 3216 out vec3 out_refr 3217 #endif 3218 #ifdef CLOSURE_GLOSSY 3219 , 3220 out vec3 ssr_spec 3221 #endif 3222 ) 3223 { 3224 #ifdef CLOSURE_DIFFUSE 3225 out_diff = vec3(0.0); 3226 #endif 3227 3228 #ifdef CLOSURE_SUBSURFACE 3229 out_trans = vec3(0.0); 3230 #endif 3231 3232 #ifdef CLOSURE_GLOSSY 3233 out_spec = vec3(0.0); 3234 #endif 3235 3236 #ifdef CLOSURE_REFRACTION 3237 out_refr = vec3(0.0); 3238 #endif 3239 3240 #ifdef SHADOW_SHADER 3241 return; 3242 #endif 3243 3244 /* Zero length vectors cause issues, see: T51979. */ 3245 float len = length(N); 3246 if (isnan(len)) { 3247 return; 3248 } 3249 N /= len; 3250 3251 #ifdef CLOSURE_CLEARCOAT 3252 len = length(C_N); 3253 if (isnan(len)) { 3254 return; 3255 } 3256 C_N /= len; 3257 #endif 3258 3259 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3260 roughness = clamp(roughness, 1e-8, 0.9999); 3261 float roughnessSquared = roughness * roughness; 3262 #endif 3263 3264 #ifdef CLOSURE_CLEARCOAT 3265 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 3266 float C_roughnessSquared = C_roughness * C_roughness; 3267 #endif 3268 3269 vec3 V = cameraVec; 3270 3271 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 3272 3273 /* ---------------------------------------------------------------- */ 3274 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 3275 /* ---------------------------------------------------------------- */ 3276 3277 #ifdef CLOSURE_GLOSSY 3278 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 3279 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 3280 #endif 3281 3282 #ifdef CLOSURE_CLEARCOAT 3283 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 3284 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 3285 vec3 out_spec_clear = vec3(0.0); 3286 #endif 3287 3288 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 3289 LightData ld = lights_data[i]; 3290 3291 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 3292 l_vector.xyz = ld.l_position - worldPosition; 3293 l_vector.w = length(l_vector.xyz); 3294 3295 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 3296 3297 if (l_vis < 1e-8) { 3298 continue; 3299 } 3300 3301 vec3 l_color_vis = ld.l_color * l_vis; 3302 3303 #ifdef CLOSURE_DIFFUSE 3304 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 3305 #endif 3306 3307 #ifdef CLOSURE_SUBSURFACE 3308 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 3309 #endif 3310 3311 #ifdef CLOSURE_GLOSSY 3312 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 3313 #endif 3314 3315 #ifdef CLOSURE_CLEARCOAT 3316 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 3317 ld.l_spec; 3318 #endif 3319 } 3320 3321 #ifdef CLOSURE_GLOSSY 3322 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 3323 out_spec *= F_area(f0, brdf_lut_lights.xy); 3324 #endif 3325 3326 #ifdef CLOSURE_CLEARCOAT 3327 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 3328 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 3329 out_spec += out_spec_clear * C_intensity; 3330 #endif 3331 3332 /* ---------------------------------------------------------------- */ 3333 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 3334 /* ---------------------------------------------------------------- */ 3335 3336 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 3337 #ifdef CLOSURE_GLOSSY 3338 vec4 spec_accum = vec4(0.0); 3339 #endif 3340 3341 #ifdef CLOSURE_CLEARCOAT 3342 vec4 C_spec_accum = vec4(0.0); 3343 #endif 3344 3345 #ifdef CLOSURE_REFRACTION 3346 vec4 refr_accum = vec4(0.0); 3347 #endif 3348 3349 #ifdef CLOSURE_GLOSSY 3350 /* ---------------------------- */ 3351 /* Planar Reflections */ 3352 /* ---------------------------- */ 3353 3354 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 3355 PlanarData pd = planars_data[i]; 3356 3357 /* Fade on geometric normal. */ 3358 float fade = probe_attenuation_planar( 3359 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 3360 3361 if (fade > 0.0) { 3362 if (!(ssrToggle && ssr_id == outputSsrId)) { 3363 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 3364 accumulate_light(spec, fade, spec_accum); 3365 } 3366 3367 #ifdef CLOSURE_CLEARCOAT 3368 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 3369 accumulate_light(C_spec, fade, C_spec_accum); 3370 #endif 3371 } 3372 } 3373 #endif 3374 3375 #ifdef CLOSURE_GLOSSY 3376 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 3377 #endif 3378 3379 #ifdef CLOSURE_CLEARCOAT 3380 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 3381 #endif 3382 3383 #ifdef CLOSURE_REFRACTION 3384 /* Refract the view vector using the depth heuristic. 3385 * Then later Refract a second time the already refracted 3386 * ray using the inverse ior. */ 3387 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 3388 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 3389 vec3 refr_pos = (refractionDepth > 0.0) ? 3390 line_plane_intersect( 3391 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 3392 worldPosition; 3393 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 3394 #endif 3395 3396 #ifdef CLOSURE_REFRACTION 3397 /* ---------------------------- */ 3398 /* Screen Space Refraction */ 3399 /* ---------------------------- */ 3400 #ifdef USE_REFRACTION 3401 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 3402 /* Find approximated position of the 2nd refraction event. */ 3403 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 3404 viewPosition; 3405 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 3406 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 3407 accumulate_light(trans.rgb, trans.a, refr_accum); 3408 } 3409 #endif 3410 3411 #endif 3412 3413 /* ---------------------------- */ 3414 /* Specular probes */ 3415 /* ---------------------------- */ 3416 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3417 3418 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 3419 # define GLASS_ACCUM 1 3420 # define ACCUM min(refr_accum.a, spec_accum.a) 3421 #elif defined(CLOSURE_REFRACTION) 3422 # define GLASS_ACCUM 0 3423 # define ACCUM refr_accum.a 3424 #else 3425 # define GLASS_ACCUM 0 3426 # define ACCUM spec_accum.a 3427 #endif 3428 3429 /* Starts at 1 because 0 is world probe */ 3430 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 3431 float fade = probe_attenuation_cube(i, worldPosition); 3432 3433 if (fade > 0.0) { 3434 3435 #if GLASS_ACCUM 3436 if (spec_accum.a < 0.999) { 3437 #endif 3438 #ifdef CLOSURE_GLOSSY 3439 if (!(ssrToggle && ssr_id == outputSsrId)) { 3440 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 3441 accumulate_light(spec, fade, spec_accum); 3442 } 3443 #endif 3444 3445 #ifdef CLOSURE_CLEARCOAT 3446 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 3447 accumulate_light(C_spec, fade, C_spec_accum); 3448 #endif 3449 #if GLASS_ACCUM 3450 } 3451 #endif 3452 3453 #if GLASS_ACCUM 3454 if (refr_accum.a < 0.999) { 3455 #endif 3456 #ifdef CLOSURE_REFRACTION 3457 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 3458 accumulate_light(trans, fade, refr_accum); 3459 #endif 3460 #if GLASS_ACCUM 3461 } 3462 #endif 3463 } 3464 } 3465 3466 #undef GLASS_ACCUM 3467 #undef ACCUM 3468 3469 /* ---------------------------- */ 3470 /* World Probe */ 3471 /* ---------------------------- */ 3472 #ifdef CLOSURE_GLOSSY 3473 if (spec_accum.a < 0.999) { 3474 if (!(ssrToggle && ssr_id == outputSsrId)) { 3475 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 3476 accumulate_light(spec, 1.0, spec_accum); 3477 } 3478 3479 # ifdef CLOSURE_CLEARCOAT 3480 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 3481 accumulate_light(C_spec, 1.0, C_spec_accum); 3482 # endif 3483 } 3484 #endif 3485 3486 #ifdef CLOSURE_REFRACTION 3487 if (refr_accum.a < 0.999) { 3488 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 3489 accumulate_light(trans, 1.0, refr_accum); 3490 } 3491 #endif 3492 #endif /* Specular probes */ 3493 3494 /* ---------------------------- */ 3495 /* Ambient Occlusion */ 3496 /* ---------------------------- */ 3497 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 3498 vec3 bent_normal; 3499 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 3500 #endif 3501 3502 /* ---------------------------- */ 3503 /* Specular Output */ 3504 /* ---------------------------- */ 3505 float NV = dot(N, V); 3506 #ifdef CLOSURE_GLOSSY 3507 vec2 uv = lut_coords(NV, roughness); 3508 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 3509 3510 /* This factor is outputted to be used by SSR in order 3511 * to match the intensity of the regular reflections. */ 3512 ssr_spec = F_ibl(f0, brdf_lut); 3513 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 3514 3515 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 3516 if (ssrToggle && ssr_id == outputSsrId) { 3517 spec_occlu = 1.0; 3518 } 3519 3520 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 3521 #endif 3522 3523 #ifdef CLOSURE_REFRACTION 3524 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 3525 3526 out_refr += refr_accum.rgb * btdf; 3527 #endif 3528 3529 #ifdef CLOSURE_CLEARCOAT 3530 NV = dot(C_N, V); 3531 vec2 C_uv = lut_coords(NV, C_roughness); 3532 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 3533 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 3534 3535 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 3536 #endif 3537 3538 #ifdef CLOSURE_GLOSSY 3539 /* Global toggle for lightprobe baking. */ 3540 out_spec *= float(specToggle); 3541 #endif 3542 3543 /* ---------------------------------------------------------------- */ 3544 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 3545 /* ---------------------------------------------------------------- */ 3546 3547 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 3548 #ifdef CLOSURE_DIFFUSE 3549 vec4 diff_accum = vec4(0.0); 3550 3551 /* ---------------------------- */ 3552 /* Irradiance Grids */ 3553 /* ---------------------------- */ 3554 /* Start at 1 because 0 is world irradiance */ 3555 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 3556 GridData gd = grids_data[i]; 3557 3558 vec3 localpos; 3559 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 3560 3561 if (fade > 0.0) { 3562 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 3563 accumulate_light(diff, fade, diff_accum); 3564 } 3565 } 3566 3567 /* ---------------------------- */ 3568 /* World Diffuse */ 3569 /* ---------------------------- */ 3570 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 3571 vec3 diff = probe_evaluate_world_diff(bent_normal); 3572 accumulate_light(diff, 1.0, diff_accum); 3573 } 3574 3575 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 3576 #endif 3577 } 3578 3579 /* Cleanup for next configuration */ 3580 #undef CLOSURE_NAME 3581 3582 #ifdef CLOSURE_DIFFUSE 3583 #undef CLOSURE_DIFFUSE 3584 #endif 3585 3586 #ifdef CLOSURE_GLOSSY 3587 #undef CLOSURE_GLOSSY 3588 #endif 3589 3590 #ifdef CLOSURE_CLEARCOAT 3591 #undef CLOSURE_CLEARCOAT 3592 #endif 3593 3594 #ifdef CLOSURE_REFRACTION 3595 #undef CLOSURE_REFRACTION 3596 #endif 3597 3598 #ifdef CLOSURE_SUBSURFACE 3599 #undef CLOSURE_SUBSURFACE 3600 #endif 3601 3602 #ifndef LIT_SURFACE_UNIFORM 3603 #define LIT_SURFACE_UNIFORM 3604 3605 uniform float refractionDepth; 3606 3607 #ifndef UTIL_TEX 3608 # define UTIL_TEX 3609 uniform sampler2DArray utilTex; 3610 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 3611 #endif /* UTIL_TEX */ 3612 3613 in vec3 worldPosition; 3614 in vec3 viewPosition; 3615 3616 #ifdef USE_FLAT_NORMAL 3617 flat in vec3 worldNormal; 3618 flat in vec3 viewNormal; 3619 #else 3620 in vec3 worldNormal; 3621 in vec3 viewNormal; 3622 #endif 3623 3624 #ifdef HAIR_SHADER 3625 in vec3 hairTangent; /* world space */ 3626 in float hairThickTime; 3627 in float hairThickness; 3628 in float hairTime; 3629 flat in int hairStrandID; 3630 3631 uniform int hairThicknessRes = 1; 3632 #endif 3633 3634 #endif /* LIT_SURFACE_UNIFORM */ 3635 3636 /** AUTO CONFIG 3637 * We include the file multiple times each time with a different configuration. 3638 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 3639 */ 3640 #if !defined(SURFACE_DEFAULT) 3641 #define SURFACE_DEFAULT 3642 #define CLOSURE_NAME eevee_closure_default 3643 #define CLOSURE_DIFFUSE 3644 #define CLOSURE_GLOSSY 3645 #endif /* SURFACE_DEFAULT */ 3646 3647 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 3648 #define SURFACE_PRINCIPLED 3649 #define CLOSURE_NAME eevee_closure_principled 3650 #define CLOSURE_DIFFUSE 3651 #define CLOSURE_GLOSSY 3652 #define CLOSURE_CLEARCOAT 3653 #define CLOSURE_REFRACTION 3654 #define CLOSURE_SUBSURFACE 3655 #endif /* SURFACE_PRINCIPLED */ 3656 3657 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 3658 #define SURFACE_CLEARCOAT 3659 #define CLOSURE_NAME eevee_closure_clearcoat 3660 #define CLOSURE_GLOSSY 3661 #define CLOSURE_CLEARCOAT 3662 #endif /* SURFACE_CLEARCOAT */ 3663 3664 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 3665 #define SURFACE_DIFFUSE 3666 #define CLOSURE_NAME eevee_closure_diffuse 3667 #define CLOSURE_DIFFUSE 3668 #endif /* SURFACE_DIFFUSE */ 3669 3670 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 3671 #define SURFACE_SUBSURFACE 3672 #define CLOSURE_NAME eevee_closure_subsurface 3673 #define CLOSURE_DIFFUSE 3674 #define CLOSURE_SUBSURFACE 3675 #endif /* SURFACE_SUBSURFACE */ 3676 3677 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 3678 #define SURFACE_SKIN 3679 #define CLOSURE_NAME eevee_closure_skin 3680 #define CLOSURE_DIFFUSE 3681 #define CLOSURE_SUBSURFACE 3682 #define CLOSURE_GLOSSY 3683 #endif /* SURFACE_SKIN */ 3684 3685 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 3686 #define SURFACE_GLOSSY 3687 #define CLOSURE_NAME eevee_closure_glossy 3688 #define CLOSURE_GLOSSY 3689 #endif /* SURFACE_GLOSSY */ 3690 3691 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 3692 #define SURFACE_REFRACT 3693 #define CLOSURE_NAME eevee_closure_refraction 3694 #define CLOSURE_REFRACTION 3695 #endif /* SURFACE_REFRACT */ 3696 3697 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 3698 #define SURFACE_GLASS 3699 #define CLOSURE_NAME eevee_closure_glass 3700 #define CLOSURE_GLOSSY 3701 #define CLOSURE_REFRACTION 3702 #endif /* SURFACE_GLASS */ 3703 3704 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 3705 #ifdef CLOSURE_CLEARCOAT 3706 #ifndef CLOSURE_GLOSSY 3707 # define CLOSURE_GLOSSY 3708 #endif 3709 #endif /* CLOSURE_CLEARCOAT */ 3710 3711 void CLOSURE_NAME(vec3 N 3712 #ifdef CLOSURE_DIFFUSE 3713 , 3714 vec3 albedo 3715 #endif 3716 #ifdef CLOSURE_GLOSSY 3717 , 3718 vec3 f0, 3719 int ssr_id 3720 #endif 3721 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3722 , 3723 float roughness 3724 #endif 3725 #ifdef CLOSURE_CLEARCOAT 3726 , 3727 vec3 C_N, 3728 float C_intensity, 3729 float C_roughness 3730 #endif 3731 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 3732 , 3733 float ao 3734 #endif 3735 #ifdef CLOSURE_SUBSURFACE 3736 , 3737 float sss_scale 3738 #endif 3739 #ifdef CLOSURE_REFRACTION 3740 , 3741 float ior 3742 #endif 3743 #ifdef CLOSURE_DIFFUSE 3744 , 3745 out vec3 out_diff 3746 #endif 3747 #ifdef CLOSURE_SUBSURFACE 3748 , 3749 out vec3 out_trans 3750 #endif 3751 #ifdef CLOSURE_GLOSSY 3752 , 3753 out vec3 out_spec 3754 #endif 3755 #ifdef CLOSURE_REFRACTION 3756 , 3757 out vec3 out_refr 3758 #endif 3759 #ifdef CLOSURE_GLOSSY 3760 , 3761 out vec3 ssr_spec 3762 #endif 3763 ) 3764 { 3765 #ifdef CLOSURE_DIFFUSE 3766 out_diff = vec3(0.0); 3767 #endif 3768 3769 #ifdef CLOSURE_SUBSURFACE 3770 out_trans = vec3(0.0); 3771 #endif 3772 3773 #ifdef CLOSURE_GLOSSY 3774 out_spec = vec3(0.0); 3775 #endif 3776 3777 #ifdef CLOSURE_REFRACTION 3778 out_refr = vec3(0.0); 3779 #endif 3780 3781 #ifdef SHADOW_SHADER 3782 return; 3783 #endif 3784 3785 /* Zero length vectors cause issues, see: T51979. */ 3786 float len = length(N); 3787 if (isnan(len)) { 3788 return; 3789 } 3790 N /= len; 3791 3792 #ifdef CLOSURE_CLEARCOAT 3793 len = length(C_N); 3794 if (isnan(len)) { 3795 return; 3796 } 3797 C_N /= len; 3798 #endif 3799 3800 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3801 roughness = clamp(roughness, 1e-8, 0.9999); 3802 float roughnessSquared = roughness * roughness; 3803 #endif 3804 3805 #ifdef CLOSURE_CLEARCOAT 3806 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 3807 float C_roughnessSquared = C_roughness * C_roughness; 3808 #endif 3809 3810 vec3 V = cameraVec; 3811 3812 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 3813 3814 /* ---------------------------------------------------------------- */ 3815 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 3816 /* ---------------------------------------------------------------- */ 3817 3818 #ifdef CLOSURE_GLOSSY 3819 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 3820 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 3821 #endif 3822 3823 #ifdef CLOSURE_CLEARCOAT 3824 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 3825 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 3826 vec3 out_spec_clear = vec3(0.0); 3827 #endif 3828 3829 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 3830 LightData ld = lights_data[i]; 3831 3832 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 3833 l_vector.xyz = ld.l_position - worldPosition; 3834 l_vector.w = length(l_vector.xyz); 3835 3836 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 3837 3838 if (l_vis < 1e-8) { 3839 continue; 3840 } 3841 3842 vec3 l_color_vis = ld.l_color * l_vis; 3843 3844 #ifdef CLOSURE_DIFFUSE 3845 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 3846 #endif 3847 3848 #ifdef CLOSURE_SUBSURFACE 3849 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 3850 #endif 3851 3852 #ifdef CLOSURE_GLOSSY 3853 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 3854 #endif 3855 3856 #ifdef CLOSURE_CLEARCOAT 3857 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 3858 ld.l_spec; 3859 #endif 3860 } 3861 3862 #ifdef CLOSURE_GLOSSY 3863 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 3864 out_spec *= F_area(f0, brdf_lut_lights.xy); 3865 #endif 3866 3867 #ifdef CLOSURE_CLEARCOAT 3868 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 3869 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 3870 out_spec += out_spec_clear * C_intensity; 3871 #endif 3872 3873 /* ---------------------------------------------------------------- */ 3874 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 3875 /* ---------------------------------------------------------------- */ 3876 3877 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 3878 #ifdef CLOSURE_GLOSSY 3879 vec4 spec_accum = vec4(0.0); 3880 #endif 3881 3882 #ifdef CLOSURE_CLEARCOAT 3883 vec4 C_spec_accum = vec4(0.0); 3884 #endif 3885 3886 #ifdef CLOSURE_REFRACTION 3887 vec4 refr_accum = vec4(0.0); 3888 #endif 3889 3890 #ifdef CLOSURE_GLOSSY 3891 /* ---------------------------- */ 3892 /* Planar Reflections */ 3893 /* ---------------------------- */ 3894 3895 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 3896 PlanarData pd = planars_data[i]; 3897 3898 /* Fade on geometric normal. */ 3899 float fade = probe_attenuation_planar( 3900 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 3901 3902 if (fade > 0.0) { 3903 if (!(ssrToggle && ssr_id == outputSsrId)) { 3904 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 3905 accumulate_light(spec, fade, spec_accum); 3906 } 3907 3908 #ifdef CLOSURE_CLEARCOAT 3909 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 3910 accumulate_light(C_spec, fade, C_spec_accum); 3911 #endif 3912 } 3913 } 3914 #endif 3915 3916 #ifdef CLOSURE_GLOSSY 3917 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 3918 #endif 3919 3920 #ifdef CLOSURE_CLEARCOAT 3921 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 3922 #endif 3923 3924 #ifdef CLOSURE_REFRACTION 3925 /* Refract the view vector using the depth heuristic. 3926 * Then later Refract a second time the already refracted 3927 * ray using the inverse ior. */ 3928 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 3929 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 3930 vec3 refr_pos = (refractionDepth > 0.0) ? 3931 line_plane_intersect( 3932 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 3933 worldPosition; 3934 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 3935 #endif 3936 3937 #ifdef CLOSURE_REFRACTION 3938 /* ---------------------------- */ 3939 /* Screen Space Refraction */ 3940 /* ---------------------------- */ 3941 #ifdef USE_REFRACTION 3942 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 3943 /* Find approximated position of the 2nd refraction event. */ 3944 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 3945 viewPosition; 3946 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 3947 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 3948 accumulate_light(trans.rgb, trans.a, refr_accum); 3949 } 3950 #endif 3951 3952 #endif 3953 3954 /* ---------------------------- */ 3955 /* Specular probes */ 3956 /* ---------------------------- */ 3957 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 3958 3959 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 3960 # define GLASS_ACCUM 1 3961 # define ACCUM min(refr_accum.a, spec_accum.a) 3962 #elif defined(CLOSURE_REFRACTION) 3963 # define GLASS_ACCUM 0 3964 # define ACCUM refr_accum.a 3965 #else 3966 # define GLASS_ACCUM 0 3967 # define ACCUM spec_accum.a 3968 #endif 3969 3970 /* Starts at 1 because 0 is world probe */ 3971 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 3972 float fade = probe_attenuation_cube(i, worldPosition); 3973 3974 if (fade > 0.0) { 3975 3976 #if GLASS_ACCUM 3977 if (spec_accum.a < 0.999) { 3978 #endif 3979 #ifdef CLOSURE_GLOSSY 3980 if (!(ssrToggle && ssr_id == outputSsrId)) { 3981 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 3982 accumulate_light(spec, fade, spec_accum); 3983 } 3984 #endif 3985 3986 #ifdef CLOSURE_CLEARCOAT 3987 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 3988 accumulate_light(C_spec, fade, C_spec_accum); 3989 #endif 3990 #if GLASS_ACCUM 3991 } 3992 #endif 3993 3994 #if GLASS_ACCUM 3995 if (refr_accum.a < 0.999) { 3996 #endif 3997 #ifdef CLOSURE_REFRACTION 3998 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 3999 accumulate_light(trans, fade, refr_accum); 4000 #endif 4001 #if GLASS_ACCUM 4002 } 4003 #endif 4004 } 4005 } 4006 4007 #undef GLASS_ACCUM 4008 #undef ACCUM 4009 4010 /* ---------------------------- */ 4011 /* World Probe */ 4012 /* ---------------------------- */ 4013 #ifdef CLOSURE_GLOSSY 4014 if (spec_accum.a < 0.999) { 4015 if (!(ssrToggle && ssr_id == outputSsrId)) { 4016 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 4017 accumulate_light(spec, 1.0, spec_accum); 4018 } 4019 4020 # ifdef CLOSURE_CLEARCOAT 4021 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 4022 accumulate_light(C_spec, 1.0, C_spec_accum); 4023 # endif 4024 } 4025 #endif 4026 4027 #ifdef CLOSURE_REFRACTION 4028 if (refr_accum.a < 0.999) { 4029 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 4030 accumulate_light(trans, 1.0, refr_accum); 4031 } 4032 #endif 4033 #endif /* Specular probes */ 4034 4035 /* ---------------------------- */ 4036 /* Ambient Occlusion */ 4037 /* ---------------------------- */ 4038 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 4039 vec3 bent_normal; 4040 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 4041 #endif 4042 4043 /* ---------------------------- */ 4044 /* Specular Output */ 4045 /* ---------------------------- */ 4046 float NV = dot(N, V); 4047 #ifdef CLOSURE_GLOSSY 4048 vec2 uv = lut_coords(NV, roughness); 4049 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 4050 4051 /* This factor is outputted to be used by SSR in order 4052 * to match the intensity of the regular reflections. */ 4053 ssr_spec = F_ibl(f0, brdf_lut); 4054 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 4055 4056 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 4057 if (ssrToggle && ssr_id == outputSsrId) { 4058 spec_occlu = 1.0; 4059 } 4060 4061 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 4062 #endif 4063 4064 #ifdef CLOSURE_REFRACTION 4065 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 4066 4067 out_refr += refr_accum.rgb * btdf; 4068 #endif 4069 4070 #ifdef CLOSURE_CLEARCOAT 4071 NV = dot(C_N, V); 4072 vec2 C_uv = lut_coords(NV, C_roughness); 4073 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 4074 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 4075 4076 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 4077 #endif 4078 4079 #ifdef CLOSURE_GLOSSY 4080 /* Global toggle for lightprobe baking. */ 4081 out_spec *= float(specToggle); 4082 #endif 4083 4084 /* ---------------------------------------------------------------- */ 4085 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 4086 /* ---------------------------------------------------------------- */ 4087 4088 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 4089 #ifdef CLOSURE_DIFFUSE 4090 vec4 diff_accum = vec4(0.0); 4091 4092 /* ---------------------------- */ 4093 /* Irradiance Grids */ 4094 /* ---------------------------- */ 4095 /* Start at 1 because 0 is world irradiance */ 4096 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 4097 GridData gd = grids_data[i]; 4098 4099 vec3 localpos; 4100 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 4101 4102 if (fade > 0.0) { 4103 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 4104 accumulate_light(diff, fade, diff_accum); 4105 } 4106 } 4107 4108 /* ---------------------------- */ 4109 /* World Diffuse */ 4110 /* ---------------------------- */ 4111 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 4112 vec3 diff = probe_evaluate_world_diff(bent_normal); 4113 accumulate_light(diff, 1.0, diff_accum); 4114 } 4115 4116 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 4117 #endif 4118 } 4119 4120 /* Cleanup for next configuration */ 4121 #undef CLOSURE_NAME 4122 4123 #ifdef CLOSURE_DIFFUSE 4124 #undef CLOSURE_DIFFUSE 4125 #endif 4126 4127 #ifdef CLOSURE_GLOSSY 4128 #undef CLOSURE_GLOSSY 4129 #endif 4130 4131 #ifdef CLOSURE_CLEARCOAT 4132 #undef CLOSURE_CLEARCOAT 4133 #endif 4134 4135 #ifdef CLOSURE_REFRACTION 4136 #undef CLOSURE_REFRACTION 4137 #endif 4138 4139 #ifdef CLOSURE_SUBSURFACE 4140 #undef CLOSURE_SUBSURFACE 4141 #endif 4142 4143 #ifndef LIT_SURFACE_UNIFORM 4144 #define LIT_SURFACE_UNIFORM 4145 4146 uniform float refractionDepth; 4147 4148 #ifndef UTIL_TEX 4149 # define UTIL_TEX 4150 uniform sampler2DArray utilTex; 4151 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 4152 #endif /* UTIL_TEX */ 4153 4154 in vec3 worldPosition; 4155 in vec3 viewPosition; 4156 4157 #ifdef USE_FLAT_NORMAL 4158 flat in vec3 worldNormal; 4159 flat in vec3 viewNormal; 4160 #else 4161 in vec3 worldNormal; 4162 in vec3 viewNormal; 4163 #endif 4164 4165 #ifdef HAIR_SHADER 4166 in vec3 hairTangent; /* world space */ 4167 in float hairThickTime; 4168 in float hairThickness; 4169 in float hairTime; 4170 flat in int hairStrandID; 4171 4172 uniform int hairThicknessRes = 1; 4173 #endif 4174 4175 #endif /* LIT_SURFACE_UNIFORM */ 4176 4177 /** AUTO CONFIG 4178 * We include the file multiple times each time with a different configuration. 4179 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 4180 */ 4181 #if !defined(SURFACE_DEFAULT) 4182 #define SURFACE_DEFAULT 4183 #define CLOSURE_NAME eevee_closure_default 4184 #define CLOSURE_DIFFUSE 4185 #define CLOSURE_GLOSSY 4186 #endif /* SURFACE_DEFAULT */ 4187 4188 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 4189 #define SURFACE_PRINCIPLED 4190 #define CLOSURE_NAME eevee_closure_principled 4191 #define CLOSURE_DIFFUSE 4192 #define CLOSURE_GLOSSY 4193 #define CLOSURE_CLEARCOAT 4194 #define CLOSURE_REFRACTION 4195 #define CLOSURE_SUBSURFACE 4196 #endif /* SURFACE_PRINCIPLED */ 4197 4198 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 4199 #define SURFACE_CLEARCOAT 4200 #define CLOSURE_NAME eevee_closure_clearcoat 4201 #define CLOSURE_GLOSSY 4202 #define CLOSURE_CLEARCOAT 4203 #endif /* SURFACE_CLEARCOAT */ 4204 4205 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 4206 #define SURFACE_DIFFUSE 4207 #define CLOSURE_NAME eevee_closure_diffuse 4208 #define CLOSURE_DIFFUSE 4209 #endif /* SURFACE_DIFFUSE */ 4210 4211 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 4212 #define SURFACE_SUBSURFACE 4213 #define CLOSURE_NAME eevee_closure_subsurface 4214 #define CLOSURE_DIFFUSE 4215 #define CLOSURE_SUBSURFACE 4216 #endif /* SURFACE_SUBSURFACE */ 4217 4218 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 4219 #define SURFACE_SKIN 4220 #define CLOSURE_NAME eevee_closure_skin 4221 #define CLOSURE_DIFFUSE 4222 #define CLOSURE_SUBSURFACE 4223 #define CLOSURE_GLOSSY 4224 #endif /* SURFACE_SKIN */ 4225 4226 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 4227 #define SURFACE_GLOSSY 4228 #define CLOSURE_NAME eevee_closure_glossy 4229 #define CLOSURE_GLOSSY 4230 #endif /* SURFACE_GLOSSY */ 4231 4232 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 4233 #define SURFACE_REFRACT 4234 #define CLOSURE_NAME eevee_closure_refraction 4235 #define CLOSURE_REFRACTION 4236 #endif /* SURFACE_REFRACT */ 4237 4238 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 4239 #define SURFACE_GLASS 4240 #define CLOSURE_NAME eevee_closure_glass 4241 #define CLOSURE_GLOSSY 4242 #define CLOSURE_REFRACTION 4243 #endif /* SURFACE_GLASS */ 4244 4245 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 4246 #ifdef CLOSURE_CLEARCOAT 4247 #ifndef CLOSURE_GLOSSY 4248 # define CLOSURE_GLOSSY 4249 #endif 4250 #endif /* CLOSURE_CLEARCOAT */ 4251 4252 void CLOSURE_NAME(vec3 N 4253 #ifdef CLOSURE_DIFFUSE 4254 , 4255 vec3 albedo 4256 #endif 4257 #ifdef CLOSURE_GLOSSY 4258 , 4259 vec3 f0, 4260 int ssr_id 4261 #endif 4262 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4263 , 4264 float roughness 4265 #endif 4266 #ifdef CLOSURE_CLEARCOAT 4267 , 4268 vec3 C_N, 4269 float C_intensity, 4270 float C_roughness 4271 #endif 4272 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 4273 , 4274 float ao 4275 #endif 4276 #ifdef CLOSURE_SUBSURFACE 4277 , 4278 float sss_scale 4279 #endif 4280 #ifdef CLOSURE_REFRACTION 4281 , 4282 float ior 4283 #endif 4284 #ifdef CLOSURE_DIFFUSE 4285 , 4286 out vec3 out_diff 4287 #endif 4288 #ifdef CLOSURE_SUBSURFACE 4289 , 4290 out vec3 out_trans 4291 #endif 4292 #ifdef CLOSURE_GLOSSY 4293 , 4294 out vec3 out_spec 4295 #endif 4296 #ifdef CLOSURE_REFRACTION 4297 , 4298 out vec3 out_refr 4299 #endif 4300 #ifdef CLOSURE_GLOSSY 4301 , 4302 out vec3 ssr_spec 4303 #endif 4304 ) 4305 { 4306 #ifdef CLOSURE_DIFFUSE 4307 out_diff = vec3(0.0); 4308 #endif 4309 4310 #ifdef CLOSURE_SUBSURFACE 4311 out_trans = vec3(0.0); 4312 #endif 4313 4314 #ifdef CLOSURE_GLOSSY 4315 out_spec = vec3(0.0); 4316 #endif 4317 4318 #ifdef CLOSURE_REFRACTION 4319 out_refr = vec3(0.0); 4320 #endif 4321 4322 #ifdef SHADOW_SHADER 4323 return; 4324 #endif 4325 4326 /* Zero length vectors cause issues, see: T51979. */ 4327 float len = length(N); 4328 if (isnan(len)) { 4329 return; 4330 } 4331 N /= len; 4332 4333 #ifdef CLOSURE_CLEARCOAT 4334 len = length(C_N); 4335 if (isnan(len)) { 4336 return; 4337 } 4338 C_N /= len; 4339 #endif 4340 4341 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4342 roughness = clamp(roughness, 1e-8, 0.9999); 4343 float roughnessSquared = roughness * roughness; 4344 #endif 4345 4346 #ifdef CLOSURE_CLEARCOAT 4347 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 4348 float C_roughnessSquared = C_roughness * C_roughness; 4349 #endif 4350 4351 vec3 V = cameraVec; 4352 4353 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 4354 4355 /* ---------------------------------------------------------------- */ 4356 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 4357 /* ---------------------------------------------------------------- */ 4358 4359 #ifdef CLOSURE_GLOSSY 4360 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 4361 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 4362 #endif 4363 4364 #ifdef CLOSURE_CLEARCOAT 4365 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 4366 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 4367 vec3 out_spec_clear = vec3(0.0); 4368 #endif 4369 4370 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 4371 LightData ld = lights_data[i]; 4372 4373 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 4374 l_vector.xyz = ld.l_position - worldPosition; 4375 l_vector.w = length(l_vector.xyz); 4376 4377 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 4378 4379 if (l_vis < 1e-8) { 4380 continue; 4381 } 4382 4383 vec3 l_color_vis = ld.l_color * l_vis; 4384 4385 #ifdef CLOSURE_DIFFUSE 4386 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 4387 #endif 4388 4389 #ifdef CLOSURE_SUBSURFACE 4390 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 4391 #endif 4392 4393 #ifdef CLOSURE_GLOSSY 4394 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 4395 #endif 4396 4397 #ifdef CLOSURE_CLEARCOAT 4398 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 4399 ld.l_spec; 4400 #endif 4401 } 4402 4403 #ifdef CLOSURE_GLOSSY 4404 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 4405 out_spec *= F_area(f0, brdf_lut_lights.xy); 4406 #endif 4407 4408 #ifdef CLOSURE_CLEARCOAT 4409 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 4410 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 4411 out_spec += out_spec_clear * C_intensity; 4412 #endif 4413 4414 /* ---------------------------------------------------------------- */ 4415 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 4416 /* ---------------------------------------------------------------- */ 4417 4418 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 4419 #ifdef CLOSURE_GLOSSY 4420 vec4 spec_accum = vec4(0.0); 4421 #endif 4422 4423 #ifdef CLOSURE_CLEARCOAT 4424 vec4 C_spec_accum = vec4(0.0); 4425 #endif 4426 4427 #ifdef CLOSURE_REFRACTION 4428 vec4 refr_accum = vec4(0.0); 4429 #endif 4430 4431 #ifdef CLOSURE_GLOSSY 4432 /* ---------------------------- */ 4433 /* Planar Reflections */ 4434 /* ---------------------------- */ 4435 4436 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 4437 PlanarData pd = planars_data[i]; 4438 4439 /* Fade on geometric normal. */ 4440 float fade = probe_attenuation_planar( 4441 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 4442 4443 if (fade > 0.0) { 4444 if (!(ssrToggle && ssr_id == outputSsrId)) { 4445 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 4446 accumulate_light(spec, fade, spec_accum); 4447 } 4448 4449 #ifdef CLOSURE_CLEARCOAT 4450 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 4451 accumulate_light(C_spec, fade, C_spec_accum); 4452 #endif 4453 } 4454 } 4455 #endif 4456 4457 #ifdef CLOSURE_GLOSSY 4458 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 4459 #endif 4460 4461 #ifdef CLOSURE_CLEARCOAT 4462 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 4463 #endif 4464 4465 #ifdef CLOSURE_REFRACTION 4466 /* Refract the view vector using the depth heuristic. 4467 * Then later Refract a second time the already refracted 4468 * ray using the inverse ior. */ 4469 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 4470 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 4471 vec3 refr_pos = (refractionDepth > 0.0) ? 4472 line_plane_intersect( 4473 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 4474 worldPosition; 4475 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 4476 #endif 4477 4478 #ifdef CLOSURE_REFRACTION 4479 /* ---------------------------- */ 4480 /* Screen Space Refraction */ 4481 /* ---------------------------- */ 4482 #ifdef USE_REFRACTION 4483 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 4484 /* Find approximated position of the 2nd refraction event. */ 4485 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 4486 viewPosition; 4487 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 4488 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 4489 accumulate_light(trans.rgb, trans.a, refr_accum); 4490 } 4491 #endif 4492 4493 #endif 4494 4495 /* ---------------------------- */ 4496 /* Specular probes */ 4497 /* ---------------------------- */ 4498 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4499 4500 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 4501 # define GLASS_ACCUM 1 4502 # define ACCUM min(refr_accum.a, spec_accum.a) 4503 #elif defined(CLOSURE_REFRACTION) 4504 # define GLASS_ACCUM 0 4505 # define ACCUM refr_accum.a 4506 #else 4507 # define GLASS_ACCUM 0 4508 # define ACCUM spec_accum.a 4509 #endif 4510 4511 /* Starts at 1 because 0 is world probe */ 4512 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 4513 float fade = probe_attenuation_cube(i, worldPosition); 4514 4515 if (fade > 0.0) { 4516 4517 #if GLASS_ACCUM 4518 if (spec_accum.a < 0.999) { 4519 #endif 4520 #ifdef CLOSURE_GLOSSY 4521 if (!(ssrToggle && ssr_id == outputSsrId)) { 4522 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 4523 accumulate_light(spec, fade, spec_accum); 4524 } 4525 #endif 4526 4527 #ifdef CLOSURE_CLEARCOAT 4528 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 4529 accumulate_light(C_spec, fade, C_spec_accum); 4530 #endif 4531 #if GLASS_ACCUM 4532 } 4533 #endif 4534 4535 #if GLASS_ACCUM 4536 if (refr_accum.a < 0.999) { 4537 #endif 4538 #ifdef CLOSURE_REFRACTION 4539 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 4540 accumulate_light(trans, fade, refr_accum); 4541 #endif 4542 #if GLASS_ACCUM 4543 } 4544 #endif 4545 } 4546 } 4547 4548 #undef GLASS_ACCUM 4549 #undef ACCUM 4550 4551 /* ---------------------------- */ 4552 /* World Probe */ 4553 /* ---------------------------- */ 4554 #ifdef CLOSURE_GLOSSY 4555 if (spec_accum.a < 0.999) { 4556 if (!(ssrToggle && ssr_id == outputSsrId)) { 4557 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 4558 accumulate_light(spec, 1.0, spec_accum); 4559 } 4560 4561 # ifdef CLOSURE_CLEARCOAT 4562 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 4563 accumulate_light(C_spec, 1.0, C_spec_accum); 4564 # endif 4565 } 4566 #endif 4567 4568 #ifdef CLOSURE_REFRACTION 4569 if (refr_accum.a < 0.999) { 4570 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 4571 accumulate_light(trans, 1.0, refr_accum); 4572 } 4573 #endif 4574 #endif /* Specular probes */ 4575 4576 /* ---------------------------- */ 4577 /* Ambient Occlusion */ 4578 /* ---------------------------- */ 4579 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 4580 vec3 bent_normal; 4581 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 4582 #endif 4583 4584 /* ---------------------------- */ 4585 /* Specular Output */ 4586 /* ---------------------------- */ 4587 float NV = dot(N, V); 4588 #ifdef CLOSURE_GLOSSY 4589 vec2 uv = lut_coords(NV, roughness); 4590 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 4591 4592 /* This factor is outputted to be used by SSR in order 4593 * to match the intensity of the regular reflections. */ 4594 ssr_spec = F_ibl(f0, brdf_lut); 4595 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 4596 4597 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 4598 if (ssrToggle && ssr_id == outputSsrId) { 4599 spec_occlu = 1.0; 4600 } 4601 4602 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 4603 #endif 4604 4605 #ifdef CLOSURE_REFRACTION 4606 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 4607 4608 out_refr += refr_accum.rgb * btdf; 4609 #endif 4610 4611 #ifdef CLOSURE_CLEARCOAT 4612 NV = dot(C_N, V); 4613 vec2 C_uv = lut_coords(NV, C_roughness); 4614 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 4615 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 4616 4617 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 4618 #endif 4619 4620 #ifdef CLOSURE_GLOSSY 4621 /* Global toggle for lightprobe baking. */ 4622 out_spec *= float(specToggle); 4623 #endif 4624 4625 /* ---------------------------------------------------------------- */ 4626 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 4627 /* ---------------------------------------------------------------- */ 4628 4629 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 4630 #ifdef CLOSURE_DIFFUSE 4631 vec4 diff_accum = vec4(0.0); 4632 4633 /* ---------------------------- */ 4634 /* Irradiance Grids */ 4635 /* ---------------------------- */ 4636 /* Start at 1 because 0 is world irradiance */ 4637 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 4638 GridData gd = grids_data[i]; 4639 4640 vec3 localpos; 4641 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 4642 4643 if (fade > 0.0) { 4644 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 4645 accumulate_light(diff, fade, diff_accum); 4646 } 4647 } 4648 4649 /* ---------------------------- */ 4650 /* World Diffuse */ 4651 /* ---------------------------- */ 4652 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 4653 vec3 diff = probe_evaluate_world_diff(bent_normal); 4654 accumulate_light(diff, 1.0, diff_accum); 4655 } 4656 4657 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 4658 #endif 4659 } 4660 4661 /* Cleanup for next configuration */ 4662 #undef CLOSURE_NAME 4663 4664 #ifdef CLOSURE_DIFFUSE 4665 #undef CLOSURE_DIFFUSE 4666 #endif 4667 4668 #ifdef CLOSURE_GLOSSY 4669 #undef CLOSURE_GLOSSY 4670 #endif 4671 4672 #ifdef CLOSURE_CLEARCOAT 4673 #undef CLOSURE_CLEARCOAT 4674 #endif 4675 4676 #ifdef CLOSURE_REFRACTION 4677 #undef CLOSURE_REFRACTION 4678 #endif 4679 4680 #ifdef CLOSURE_SUBSURFACE 4681 #undef CLOSURE_SUBSURFACE 4682 #endif 4683 4684 #ifndef LIT_SURFACE_UNIFORM 4685 #define LIT_SURFACE_UNIFORM 4686 4687 uniform float refractionDepth; 4688 4689 #ifndef UTIL_TEX 4690 # define UTIL_TEX 4691 uniform sampler2DArray utilTex; 4692 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 4693 #endif /* UTIL_TEX */ 4694 4695 in vec3 worldPosition; 4696 in vec3 viewPosition; 4697 4698 #ifdef USE_FLAT_NORMAL 4699 flat in vec3 worldNormal; 4700 flat in vec3 viewNormal; 4701 #else 4702 in vec3 worldNormal; 4703 in vec3 viewNormal; 4704 #endif 4705 4706 #ifdef HAIR_SHADER 4707 in vec3 hairTangent; /* world space */ 4708 in float hairThickTime; 4709 in float hairThickness; 4710 in float hairTime; 4711 flat in int hairStrandID; 4712 4713 uniform int hairThicknessRes = 1; 4714 #endif 4715 4716 #endif /* LIT_SURFACE_UNIFORM */ 4717 4718 /** AUTO CONFIG 4719 * We include the file multiple times each time with a different configuration. 4720 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 4721 */ 4722 #if !defined(SURFACE_DEFAULT) 4723 #define SURFACE_DEFAULT 4724 #define CLOSURE_NAME eevee_closure_default 4725 #define CLOSURE_DIFFUSE 4726 #define CLOSURE_GLOSSY 4727 #endif /* SURFACE_DEFAULT */ 4728 4729 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 4730 #define SURFACE_PRINCIPLED 4731 #define CLOSURE_NAME eevee_closure_principled 4732 #define CLOSURE_DIFFUSE 4733 #define CLOSURE_GLOSSY 4734 #define CLOSURE_CLEARCOAT 4735 #define CLOSURE_REFRACTION 4736 #define CLOSURE_SUBSURFACE 4737 #endif /* SURFACE_PRINCIPLED */ 4738 4739 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 4740 #define SURFACE_CLEARCOAT 4741 #define CLOSURE_NAME eevee_closure_clearcoat 4742 #define CLOSURE_GLOSSY 4743 #define CLOSURE_CLEARCOAT 4744 #endif /* SURFACE_CLEARCOAT */ 4745 4746 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 4747 #define SURFACE_DIFFUSE 4748 #define CLOSURE_NAME eevee_closure_diffuse 4749 #define CLOSURE_DIFFUSE 4750 #endif /* SURFACE_DIFFUSE */ 4751 4752 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 4753 #define SURFACE_SUBSURFACE 4754 #define CLOSURE_NAME eevee_closure_subsurface 4755 #define CLOSURE_DIFFUSE 4756 #define CLOSURE_SUBSURFACE 4757 #endif /* SURFACE_SUBSURFACE */ 4758 4759 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 4760 #define SURFACE_SKIN 4761 #define CLOSURE_NAME eevee_closure_skin 4762 #define CLOSURE_DIFFUSE 4763 #define CLOSURE_SUBSURFACE 4764 #define CLOSURE_GLOSSY 4765 #endif /* SURFACE_SKIN */ 4766 4767 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 4768 #define SURFACE_GLOSSY 4769 #define CLOSURE_NAME eevee_closure_glossy 4770 #define CLOSURE_GLOSSY 4771 #endif /* SURFACE_GLOSSY */ 4772 4773 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 4774 #define SURFACE_REFRACT 4775 #define CLOSURE_NAME eevee_closure_refraction 4776 #define CLOSURE_REFRACTION 4777 #endif /* SURFACE_REFRACT */ 4778 4779 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 4780 #define SURFACE_GLASS 4781 #define CLOSURE_NAME eevee_closure_glass 4782 #define CLOSURE_GLOSSY 4783 #define CLOSURE_REFRACTION 4784 #endif /* SURFACE_GLASS */ 4785 4786 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 4787 #ifdef CLOSURE_CLEARCOAT 4788 #ifndef CLOSURE_GLOSSY 4789 # define CLOSURE_GLOSSY 4790 #endif 4791 #endif /* CLOSURE_CLEARCOAT */ 4792 4793 void CLOSURE_NAME(vec3 N 4794 #ifdef CLOSURE_DIFFUSE 4795 , 4796 vec3 albedo 4797 #endif 4798 #ifdef CLOSURE_GLOSSY 4799 , 4800 vec3 f0, 4801 int ssr_id 4802 #endif 4803 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4804 , 4805 float roughness 4806 #endif 4807 #ifdef CLOSURE_CLEARCOAT 4808 , 4809 vec3 C_N, 4810 float C_intensity, 4811 float C_roughness 4812 #endif 4813 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 4814 , 4815 float ao 4816 #endif 4817 #ifdef CLOSURE_SUBSURFACE 4818 , 4819 float sss_scale 4820 #endif 4821 #ifdef CLOSURE_REFRACTION 4822 , 4823 float ior 4824 #endif 4825 #ifdef CLOSURE_DIFFUSE 4826 , 4827 out vec3 out_diff 4828 #endif 4829 #ifdef CLOSURE_SUBSURFACE 4830 , 4831 out vec3 out_trans 4832 #endif 4833 #ifdef CLOSURE_GLOSSY 4834 , 4835 out vec3 out_spec 4836 #endif 4837 #ifdef CLOSURE_REFRACTION 4838 , 4839 out vec3 out_refr 4840 #endif 4841 #ifdef CLOSURE_GLOSSY 4842 , 4843 out vec3 ssr_spec 4844 #endif 4845 ) 4846 { 4847 #ifdef CLOSURE_DIFFUSE 4848 out_diff = vec3(0.0); 4849 #endif 4850 4851 #ifdef CLOSURE_SUBSURFACE 4852 out_trans = vec3(0.0); 4853 #endif 4854 4855 #ifdef CLOSURE_GLOSSY 4856 out_spec = vec3(0.0); 4857 #endif 4858 4859 #ifdef CLOSURE_REFRACTION 4860 out_refr = vec3(0.0); 4861 #endif 4862 4863 #ifdef SHADOW_SHADER 4864 return; 4865 #endif 4866 4867 /* Zero length vectors cause issues, see: T51979. */ 4868 float len = length(N); 4869 if (isnan(len)) { 4870 return; 4871 } 4872 N /= len; 4873 4874 #ifdef CLOSURE_CLEARCOAT 4875 len = length(C_N); 4876 if (isnan(len)) { 4877 return; 4878 } 4879 C_N /= len; 4880 #endif 4881 4882 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 4883 roughness = clamp(roughness, 1e-8, 0.9999); 4884 float roughnessSquared = roughness * roughness; 4885 #endif 4886 4887 #ifdef CLOSURE_CLEARCOAT 4888 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 4889 float C_roughnessSquared = C_roughness * C_roughness; 4890 #endif 4891 4892 vec3 V = cameraVec; 4893 4894 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 4895 4896 /* ---------------------------------------------------------------- */ 4897 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 4898 /* ---------------------------------------------------------------- */ 4899 4900 #ifdef CLOSURE_GLOSSY 4901 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 4902 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 4903 #endif 4904 4905 #ifdef CLOSURE_CLEARCOAT 4906 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 4907 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 4908 vec3 out_spec_clear = vec3(0.0); 4909 #endif 4910 4911 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 4912 LightData ld = lights_data[i]; 4913 4914 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 4915 l_vector.xyz = ld.l_position - worldPosition; 4916 l_vector.w = length(l_vector.xyz); 4917 4918 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 4919 4920 if (l_vis < 1e-8) { 4921 continue; 4922 } 4923 4924 vec3 l_color_vis = ld.l_color * l_vis; 4925 4926 #ifdef CLOSURE_DIFFUSE 4927 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 4928 #endif 4929 4930 #ifdef CLOSURE_SUBSURFACE 4931 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 4932 #endif 4933 4934 #ifdef CLOSURE_GLOSSY 4935 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 4936 #endif 4937 4938 #ifdef CLOSURE_CLEARCOAT 4939 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 4940 ld.l_spec; 4941 #endif 4942 } 4943 4944 #ifdef CLOSURE_GLOSSY 4945 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 4946 out_spec *= F_area(f0, brdf_lut_lights.xy); 4947 #endif 4948 4949 #ifdef CLOSURE_CLEARCOAT 4950 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 4951 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 4952 out_spec += out_spec_clear * C_intensity; 4953 #endif 4954 4955 /* ---------------------------------------------------------------- */ 4956 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 4957 /* ---------------------------------------------------------------- */ 4958 4959 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 4960 #ifdef CLOSURE_GLOSSY 4961 vec4 spec_accum = vec4(0.0); 4962 #endif 4963 4964 #ifdef CLOSURE_CLEARCOAT 4965 vec4 C_spec_accum = vec4(0.0); 4966 #endif 4967 4968 #ifdef CLOSURE_REFRACTION 4969 vec4 refr_accum = vec4(0.0); 4970 #endif 4971 4972 #ifdef CLOSURE_GLOSSY 4973 /* ---------------------------- */ 4974 /* Planar Reflections */ 4975 /* ---------------------------- */ 4976 4977 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 4978 PlanarData pd = planars_data[i]; 4979 4980 /* Fade on geometric normal. */ 4981 float fade = probe_attenuation_planar( 4982 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 4983 4984 if (fade > 0.0) { 4985 if (!(ssrToggle && ssr_id == outputSsrId)) { 4986 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 4987 accumulate_light(spec, fade, spec_accum); 4988 } 4989 4990 #ifdef CLOSURE_CLEARCOAT 4991 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 4992 accumulate_light(C_spec, fade, C_spec_accum); 4993 #endif 4994 } 4995 } 4996 #endif 4997 4998 #ifdef CLOSURE_GLOSSY 4999 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 5000 #endif 5001 5002 #ifdef CLOSURE_CLEARCOAT 5003 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 5004 #endif 5005 5006 #ifdef CLOSURE_REFRACTION 5007 /* Refract the view vector using the depth heuristic. 5008 * Then later Refract a second time the already refracted 5009 * ray using the inverse ior. */ 5010 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 5011 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 5012 vec3 refr_pos = (refractionDepth > 0.0) ? 5013 line_plane_intersect( 5014 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 5015 worldPosition; 5016 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 5017 #endif 5018 5019 #ifdef CLOSURE_REFRACTION 5020 /* ---------------------------- */ 5021 /* Screen Space Refraction */ 5022 /* ---------------------------- */ 5023 #ifdef USE_REFRACTION 5024 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 5025 /* Find approximated position of the 2nd refraction event. */ 5026 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 5027 viewPosition; 5028 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 5029 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 5030 accumulate_light(trans.rgb, trans.a, refr_accum); 5031 } 5032 #endif 5033 5034 #endif 5035 5036 /* ---------------------------- */ 5037 /* Specular probes */ 5038 /* ---------------------------- */ 5039 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5040 5041 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 5042 # define GLASS_ACCUM 1 5043 # define ACCUM min(refr_accum.a, spec_accum.a) 5044 #elif defined(CLOSURE_REFRACTION) 5045 # define GLASS_ACCUM 0 5046 # define ACCUM refr_accum.a 5047 #else 5048 # define GLASS_ACCUM 0 5049 # define ACCUM spec_accum.a 5050 #endif 5051 5052 /* Starts at 1 because 0 is world probe */ 5053 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 5054 float fade = probe_attenuation_cube(i, worldPosition); 5055 5056 if (fade > 0.0) { 5057 5058 #if GLASS_ACCUM 5059 if (spec_accum.a < 0.999) { 5060 #endif 5061 #ifdef CLOSURE_GLOSSY 5062 if (!(ssrToggle && ssr_id == outputSsrId)) { 5063 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 5064 accumulate_light(spec, fade, spec_accum); 5065 } 5066 #endif 5067 5068 #ifdef CLOSURE_CLEARCOAT 5069 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 5070 accumulate_light(C_spec, fade, C_spec_accum); 5071 #endif 5072 #if GLASS_ACCUM 5073 } 5074 #endif 5075 5076 #if GLASS_ACCUM 5077 if (refr_accum.a < 0.999) { 5078 #endif 5079 #ifdef CLOSURE_REFRACTION 5080 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 5081 accumulate_light(trans, fade, refr_accum); 5082 #endif 5083 #if GLASS_ACCUM 5084 } 5085 #endif 5086 } 5087 } 5088 5089 #undef GLASS_ACCUM 5090 #undef ACCUM 5091 5092 /* ---------------------------- */ 5093 /* World Probe */ 5094 /* ---------------------------- */ 5095 #ifdef CLOSURE_GLOSSY 5096 if (spec_accum.a < 0.999) { 5097 if (!(ssrToggle && ssr_id == outputSsrId)) { 5098 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 5099 accumulate_light(spec, 1.0, spec_accum); 5100 } 5101 5102 # ifdef CLOSURE_CLEARCOAT 5103 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 5104 accumulate_light(C_spec, 1.0, C_spec_accum); 5105 # endif 5106 } 5107 #endif 5108 5109 #ifdef CLOSURE_REFRACTION 5110 if (refr_accum.a < 0.999) { 5111 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 5112 accumulate_light(trans, 1.0, refr_accum); 5113 } 5114 #endif 5115 #endif /* Specular probes */ 5116 5117 /* ---------------------------- */ 5118 /* Ambient Occlusion */ 5119 /* ---------------------------- */ 5120 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 5121 vec3 bent_normal; 5122 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 5123 #endif 5124 5125 /* ---------------------------- */ 5126 /* Specular Output */ 5127 /* ---------------------------- */ 5128 float NV = dot(N, V); 5129 #ifdef CLOSURE_GLOSSY 5130 vec2 uv = lut_coords(NV, roughness); 5131 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 5132 5133 /* This factor is outputted to be used by SSR in order 5134 * to match the intensity of the regular reflections. */ 5135 ssr_spec = F_ibl(f0, brdf_lut); 5136 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 5137 5138 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 5139 if (ssrToggle && ssr_id == outputSsrId) { 5140 spec_occlu = 1.0; 5141 } 5142 5143 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 5144 #endif 5145 5146 #ifdef CLOSURE_REFRACTION 5147 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 5148 5149 out_refr += refr_accum.rgb * btdf; 5150 #endif 5151 5152 #ifdef CLOSURE_CLEARCOAT 5153 NV = dot(C_N, V); 5154 vec2 C_uv = lut_coords(NV, C_roughness); 5155 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 5156 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 5157 5158 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 5159 #endif 5160 5161 #ifdef CLOSURE_GLOSSY 5162 /* Global toggle for lightprobe baking. */ 5163 out_spec *= float(specToggle); 5164 #endif 5165 5166 /* ---------------------------------------------------------------- */ 5167 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 5168 /* ---------------------------------------------------------------- */ 5169 5170 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 5171 #ifdef CLOSURE_DIFFUSE 5172 vec4 diff_accum = vec4(0.0); 5173 5174 /* ---------------------------- */ 5175 /* Irradiance Grids */ 5176 /* ---------------------------- */ 5177 /* Start at 1 because 0 is world irradiance */ 5178 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 5179 GridData gd = grids_data[i]; 5180 5181 vec3 localpos; 5182 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 5183 5184 if (fade > 0.0) { 5185 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 5186 accumulate_light(diff, fade, diff_accum); 5187 } 5188 } 5189 5190 /* ---------------------------- */ 5191 /* World Diffuse */ 5192 /* ---------------------------- */ 5193 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 5194 vec3 diff = probe_evaluate_world_diff(bent_normal); 5195 accumulate_light(diff, 1.0, diff_accum); 5196 } 5197 5198 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 5199 #endif 5200 } 5201 5202 /* Cleanup for next configuration */ 5203 #undef CLOSURE_NAME 5204 5205 #ifdef CLOSURE_DIFFUSE 5206 #undef CLOSURE_DIFFUSE 5207 #endif 5208 5209 #ifdef CLOSURE_GLOSSY 5210 #undef CLOSURE_GLOSSY 5211 #endif 5212 5213 #ifdef CLOSURE_CLEARCOAT 5214 #undef CLOSURE_CLEARCOAT 5215 #endif 5216 5217 #ifdef CLOSURE_REFRACTION 5218 #undef CLOSURE_REFRACTION 5219 #endif 5220 5221 #ifdef CLOSURE_SUBSURFACE 5222 #undef CLOSURE_SUBSURFACE 5223 #endif 5224 5225 #ifndef LIT_SURFACE_UNIFORM 5226 #define LIT_SURFACE_UNIFORM 5227 5228 uniform float refractionDepth; 5229 5230 #ifndef UTIL_TEX 5231 # define UTIL_TEX 5232 uniform sampler2DArray utilTex; 5233 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 5234 #endif /* UTIL_TEX */ 5235 5236 in vec3 worldPosition; 5237 in vec3 viewPosition; 5238 5239 #ifdef USE_FLAT_NORMAL 5240 flat in vec3 worldNormal; 5241 flat in vec3 viewNormal; 5242 #else 5243 in vec3 worldNormal; 5244 in vec3 viewNormal; 5245 #endif 5246 5247 #ifdef HAIR_SHADER 5248 in vec3 hairTangent; /* world space */ 5249 in float hairThickTime; 5250 in float hairThickness; 5251 in float hairTime; 5252 flat in int hairStrandID; 5253 5254 uniform int hairThicknessRes = 1; 5255 #endif 5256 5257 #endif /* LIT_SURFACE_UNIFORM */ 5258 5259 /** AUTO CONFIG 5260 * We include the file multiple times each time with a different configuration. 5261 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 5262 */ 5263 #if !defined(SURFACE_DEFAULT) 5264 #define SURFACE_DEFAULT 5265 #define CLOSURE_NAME eevee_closure_default 5266 #define CLOSURE_DIFFUSE 5267 #define CLOSURE_GLOSSY 5268 #endif /* SURFACE_DEFAULT */ 5269 5270 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 5271 #define SURFACE_PRINCIPLED 5272 #define CLOSURE_NAME eevee_closure_principled 5273 #define CLOSURE_DIFFUSE 5274 #define CLOSURE_GLOSSY 5275 #define CLOSURE_CLEARCOAT 5276 #define CLOSURE_REFRACTION 5277 #define CLOSURE_SUBSURFACE 5278 #endif /* SURFACE_PRINCIPLED */ 5279 5280 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 5281 #define SURFACE_CLEARCOAT 5282 #define CLOSURE_NAME eevee_closure_clearcoat 5283 #define CLOSURE_GLOSSY 5284 #define CLOSURE_CLEARCOAT 5285 #endif /* SURFACE_CLEARCOAT */ 5286 5287 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 5288 #define SURFACE_DIFFUSE 5289 #define CLOSURE_NAME eevee_closure_diffuse 5290 #define CLOSURE_DIFFUSE 5291 #endif /* SURFACE_DIFFUSE */ 5292 5293 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 5294 #define SURFACE_SUBSURFACE 5295 #define CLOSURE_NAME eevee_closure_subsurface 5296 #define CLOSURE_DIFFUSE 5297 #define CLOSURE_SUBSURFACE 5298 #endif /* SURFACE_SUBSURFACE */ 5299 5300 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 5301 #define SURFACE_SKIN 5302 #define CLOSURE_NAME eevee_closure_skin 5303 #define CLOSURE_DIFFUSE 5304 #define CLOSURE_SUBSURFACE 5305 #define CLOSURE_GLOSSY 5306 #endif /* SURFACE_SKIN */ 5307 5308 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 5309 #define SURFACE_GLOSSY 5310 #define CLOSURE_NAME eevee_closure_glossy 5311 #define CLOSURE_GLOSSY 5312 #endif /* SURFACE_GLOSSY */ 5313 5314 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 5315 #define SURFACE_REFRACT 5316 #define CLOSURE_NAME eevee_closure_refraction 5317 #define CLOSURE_REFRACTION 5318 #endif /* SURFACE_REFRACT */ 5319 5320 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 5321 #define SURFACE_GLASS 5322 #define CLOSURE_NAME eevee_closure_glass 5323 #define CLOSURE_GLOSSY 5324 #define CLOSURE_REFRACTION 5325 #endif /* SURFACE_GLASS */ 5326 5327 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 5328 #ifdef CLOSURE_CLEARCOAT 5329 #ifndef CLOSURE_GLOSSY 5330 # define CLOSURE_GLOSSY 5331 #endif 5332 #endif /* CLOSURE_CLEARCOAT */ 5333 5334 void CLOSURE_NAME(vec3 N 5335 #ifdef CLOSURE_DIFFUSE 5336 , 5337 vec3 albedo 5338 #endif 5339 #ifdef CLOSURE_GLOSSY 5340 , 5341 vec3 f0, 5342 int ssr_id 5343 #endif 5344 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5345 , 5346 float roughness 5347 #endif 5348 #ifdef CLOSURE_CLEARCOAT 5349 , 5350 vec3 C_N, 5351 float C_intensity, 5352 float C_roughness 5353 #endif 5354 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 5355 , 5356 float ao 5357 #endif 5358 #ifdef CLOSURE_SUBSURFACE 5359 , 5360 float sss_scale 5361 #endif 5362 #ifdef CLOSURE_REFRACTION 5363 , 5364 float ior 5365 #endif 5366 #ifdef CLOSURE_DIFFUSE 5367 , 5368 out vec3 out_diff 5369 #endif 5370 #ifdef CLOSURE_SUBSURFACE 5371 , 5372 out vec3 out_trans 5373 #endif 5374 #ifdef CLOSURE_GLOSSY 5375 , 5376 out vec3 out_spec 5377 #endif 5378 #ifdef CLOSURE_REFRACTION 5379 , 5380 out vec3 out_refr 5381 #endif 5382 #ifdef CLOSURE_GLOSSY 5383 , 5384 out vec3 ssr_spec 5385 #endif 5386 ) 5387 { 5388 #ifdef CLOSURE_DIFFUSE 5389 out_diff = vec3(0.0); 5390 #endif 5391 5392 #ifdef CLOSURE_SUBSURFACE 5393 out_trans = vec3(0.0); 5394 #endif 5395 5396 #ifdef CLOSURE_GLOSSY 5397 out_spec = vec3(0.0); 5398 #endif 5399 5400 #ifdef CLOSURE_REFRACTION 5401 out_refr = vec3(0.0); 5402 #endif 5403 5404 #ifdef SHADOW_SHADER 5405 return; 5406 #endif 5407 5408 /* Zero length vectors cause issues, see: T51979. */ 5409 float len = length(N); 5410 if (isnan(len)) { 5411 return; 5412 } 5413 N /= len; 5414 5415 #ifdef CLOSURE_CLEARCOAT 5416 len = length(C_N); 5417 if (isnan(len)) { 5418 return; 5419 } 5420 C_N /= len; 5421 #endif 5422 5423 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5424 roughness = clamp(roughness, 1e-8, 0.9999); 5425 float roughnessSquared = roughness * roughness; 5426 #endif 5427 5428 #ifdef CLOSURE_CLEARCOAT 5429 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 5430 float C_roughnessSquared = C_roughness * C_roughness; 5431 #endif 5432 5433 vec3 V = cameraVec; 5434 5435 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 5436 5437 /* ---------------------------------------------------------------- */ 5438 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 5439 /* ---------------------------------------------------------------- */ 5440 5441 #ifdef CLOSURE_GLOSSY 5442 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 5443 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 5444 #endif 5445 5446 #ifdef CLOSURE_CLEARCOAT 5447 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 5448 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 5449 vec3 out_spec_clear = vec3(0.0); 5450 #endif 5451 5452 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 5453 LightData ld = lights_data[i]; 5454 5455 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 5456 l_vector.xyz = ld.l_position - worldPosition; 5457 l_vector.w = length(l_vector.xyz); 5458 5459 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 5460 5461 if (l_vis < 1e-8) { 5462 continue; 5463 } 5464 5465 vec3 l_color_vis = ld.l_color * l_vis; 5466 5467 #ifdef CLOSURE_DIFFUSE 5468 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 5469 #endif 5470 5471 #ifdef CLOSURE_SUBSURFACE 5472 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 5473 #endif 5474 5475 #ifdef CLOSURE_GLOSSY 5476 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 5477 #endif 5478 5479 #ifdef CLOSURE_CLEARCOAT 5480 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 5481 ld.l_spec; 5482 #endif 5483 } 5484 5485 #ifdef CLOSURE_GLOSSY 5486 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 5487 out_spec *= F_area(f0, brdf_lut_lights.xy); 5488 #endif 5489 5490 #ifdef CLOSURE_CLEARCOAT 5491 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 5492 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 5493 out_spec += out_spec_clear * C_intensity; 5494 #endif 5495 5496 /* ---------------------------------------------------------------- */ 5497 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 5498 /* ---------------------------------------------------------------- */ 5499 5500 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 5501 #ifdef CLOSURE_GLOSSY 5502 vec4 spec_accum = vec4(0.0); 5503 #endif 5504 5505 #ifdef CLOSURE_CLEARCOAT 5506 vec4 C_spec_accum = vec4(0.0); 5507 #endif 5508 5509 #ifdef CLOSURE_REFRACTION 5510 vec4 refr_accum = vec4(0.0); 5511 #endif 5512 5513 #ifdef CLOSURE_GLOSSY 5514 /* ---------------------------- */ 5515 /* Planar Reflections */ 5516 /* ---------------------------- */ 5517 5518 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 5519 PlanarData pd = planars_data[i]; 5520 5521 /* Fade on geometric normal. */ 5522 float fade = probe_attenuation_planar( 5523 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 5524 5525 if (fade > 0.0) { 5526 if (!(ssrToggle && ssr_id == outputSsrId)) { 5527 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 5528 accumulate_light(spec, fade, spec_accum); 5529 } 5530 5531 #ifdef CLOSURE_CLEARCOAT 5532 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 5533 accumulate_light(C_spec, fade, C_spec_accum); 5534 #endif 5535 } 5536 } 5537 #endif 5538 5539 #ifdef CLOSURE_GLOSSY 5540 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 5541 #endif 5542 5543 #ifdef CLOSURE_CLEARCOAT 5544 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 5545 #endif 5546 5547 #ifdef CLOSURE_REFRACTION 5548 /* Refract the view vector using the depth heuristic. 5549 * Then later Refract a second time the already refracted 5550 * ray using the inverse ior. */ 5551 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 5552 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 5553 vec3 refr_pos = (refractionDepth > 0.0) ? 5554 line_plane_intersect( 5555 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 5556 worldPosition; 5557 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 5558 #endif 5559 5560 #ifdef CLOSURE_REFRACTION 5561 /* ---------------------------- */ 5562 /* Screen Space Refraction */ 5563 /* ---------------------------- */ 5564 #ifdef USE_REFRACTION 5565 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 5566 /* Find approximated position of the 2nd refraction event. */ 5567 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 5568 viewPosition; 5569 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 5570 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 5571 accumulate_light(trans.rgb, trans.a, refr_accum); 5572 } 5573 #endif 5574 5575 #endif 5576 5577 /* ---------------------------- */ 5578 /* Specular probes */ 5579 /* ---------------------------- */ 5580 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5581 5582 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 5583 # define GLASS_ACCUM 1 5584 # define ACCUM min(refr_accum.a, spec_accum.a) 5585 #elif defined(CLOSURE_REFRACTION) 5586 # define GLASS_ACCUM 0 5587 # define ACCUM refr_accum.a 5588 #else 5589 # define GLASS_ACCUM 0 5590 # define ACCUM spec_accum.a 5591 #endif 5592 5593 /* Starts at 1 because 0 is world probe */ 5594 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 5595 float fade = probe_attenuation_cube(i, worldPosition); 5596 5597 if (fade > 0.0) { 5598 5599 #if GLASS_ACCUM 5600 if (spec_accum.a < 0.999) { 5601 #endif 5602 #ifdef CLOSURE_GLOSSY 5603 if (!(ssrToggle && ssr_id == outputSsrId)) { 5604 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 5605 accumulate_light(spec, fade, spec_accum); 5606 } 5607 #endif 5608 5609 #ifdef CLOSURE_CLEARCOAT 5610 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 5611 accumulate_light(C_spec, fade, C_spec_accum); 5612 #endif 5613 #if GLASS_ACCUM 5614 } 5615 #endif 5616 5617 #if GLASS_ACCUM 5618 if (refr_accum.a < 0.999) { 5619 #endif 5620 #ifdef CLOSURE_REFRACTION 5621 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 5622 accumulate_light(trans, fade, refr_accum); 5623 #endif 5624 #if GLASS_ACCUM 5625 } 5626 #endif 5627 } 5628 } 5629 5630 #undef GLASS_ACCUM 5631 #undef ACCUM 5632 5633 /* ---------------------------- */ 5634 /* World Probe */ 5635 /* ---------------------------- */ 5636 #ifdef CLOSURE_GLOSSY 5637 if (spec_accum.a < 0.999) { 5638 if (!(ssrToggle && ssr_id == outputSsrId)) { 5639 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 5640 accumulate_light(spec, 1.0, spec_accum); 5641 } 5642 5643 # ifdef CLOSURE_CLEARCOAT 5644 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 5645 accumulate_light(C_spec, 1.0, C_spec_accum); 5646 # endif 5647 } 5648 #endif 5649 5650 #ifdef CLOSURE_REFRACTION 5651 if (refr_accum.a < 0.999) { 5652 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 5653 accumulate_light(trans, 1.0, refr_accum); 5654 } 5655 #endif 5656 #endif /* Specular probes */ 5657 5658 /* ---------------------------- */ 5659 /* Ambient Occlusion */ 5660 /* ---------------------------- */ 5661 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 5662 vec3 bent_normal; 5663 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 5664 #endif 5665 5666 /* ---------------------------- */ 5667 /* Specular Output */ 5668 /* ---------------------------- */ 5669 float NV = dot(N, V); 5670 #ifdef CLOSURE_GLOSSY 5671 vec2 uv = lut_coords(NV, roughness); 5672 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 5673 5674 /* This factor is outputted to be used by SSR in order 5675 * to match the intensity of the regular reflections. */ 5676 ssr_spec = F_ibl(f0, brdf_lut); 5677 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 5678 5679 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 5680 if (ssrToggle && ssr_id == outputSsrId) { 5681 spec_occlu = 1.0; 5682 } 5683 5684 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 5685 #endif 5686 5687 #ifdef CLOSURE_REFRACTION 5688 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 5689 5690 out_refr += refr_accum.rgb * btdf; 5691 #endif 5692 5693 #ifdef CLOSURE_CLEARCOAT 5694 NV = dot(C_N, V); 5695 vec2 C_uv = lut_coords(NV, C_roughness); 5696 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 5697 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 5698 5699 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 5700 #endif 5701 5702 #ifdef CLOSURE_GLOSSY 5703 /* Global toggle for lightprobe baking. */ 5704 out_spec *= float(specToggle); 5705 #endif 5706 5707 /* ---------------------------------------------------------------- */ 5708 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 5709 /* ---------------------------------------------------------------- */ 5710 5711 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 5712 #ifdef CLOSURE_DIFFUSE 5713 vec4 diff_accum = vec4(0.0); 5714 5715 /* ---------------------------- */ 5716 /* Irradiance Grids */ 5717 /* ---------------------------- */ 5718 /* Start at 1 because 0 is world irradiance */ 5719 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 5720 GridData gd = grids_data[i]; 5721 5722 vec3 localpos; 5723 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 5724 5725 if (fade > 0.0) { 5726 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 5727 accumulate_light(diff, fade, diff_accum); 5728 } 5729 } 5730 5731 /* ---------------------------- */ 5732 /* World Diffuse */ 5733 /* ---------------------------- */ 5734 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 5735 vec3 diff = probe_evaluate_world_diff(bent_normal); 5736 accumulate_light(diff, 1.0, diff_accum); 5737 } 5738 5739 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 5740 #endif 5741 } 5742 5743 /* Cleanup for next configuration */ 5744 #undef CLOSURE_NAME 5745 5746 #ifdef CLOSURE_DIFFUSE 5747 #undef CLOSURE_DIFFUSE 5748 #endif 5749 5750 #ifdef CLOSURE_GLOSSY 5751 #undef CLOSURE_GLOSSY 5752 #endif 5753 5754 #ifdef CLOSURE_CLEARCOAT 5755 #undef CLOSURE_CLEARCOAT 5756 #endif 5757 5758 #ifdef CLOSURE_REFRACTION 5759 #undef CLOSURE_REFRACTION 5760 #endif 5761 5762 #ifdef CLOSURE_SUBSURFACE 5763 #undef CLOSURE_SUBSURFACE 5764 #endif 5765 5766 #ifndef LIT_SURFACE_UNIFORM 5767 #define LIT_SURFACE_UNIFORM 5768 5769 uniform float refractionDepth; 5770 5771 #ifndef UTIL_TEX 5772 # define UTIL_TEX 5773 uniform sampler2DArray utilTex; 5774 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 5775 #endif /* UTIL_TEX */ 5776 5777 in vec3 worldPosition; 5778 in vec3 viewPosition; 5779 5780 #ifdef USE_FLAT_NORMAL 5781 flat in vec3 worldNormal; 5782 flat in vec3 viewNormal; 5783 #else 5784 in vec3 worldNormal; 5785 in vec3 viewNormal; 5786 #endif 5787 5788 #ifdef HAIR_SHADER 5789 in vec3 hairTangent; /* world space */ 5790 in float hairThickTime; 5791 in float hairThickness; 5792 in float hairTime; 5793 flat in int hairStrandID; 5794 5795 uniform int hairThicknessRes = 1; 5796 #endif 5797 5798 #endif /* LIT_SURFACE_UNIFORM */ 5799 5800 /** AUTO CONFIG 5801 * We include the file multiple times each time with a different configuration. 5802 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 5803 */ 5804 #if !defined(SURFACE_DEFAULT) 5805 #define SURFACE_DEFAULT 5806 #define CLOSURE_NAME eevee_closure_default 5807 #define CLOSURE_DIFFUSE 5808 #define CLOSURE_GLOSSY 5809 #endif /* SURFACE_DEFAULT */ 5810 5811 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 5812 #define SURFACE_PRINCIPLED 5813 #define CLOSURE_NAME eevee_closure_principled 5814 #define CLOSURE_DIFFUSE 5815 #define CLOSURE_GLOSSY 5816 #define CLOSURE_CLEARCOAT 5817 #define CLOSURE_REFRACTION 5818 #define CLOSURE_SUBSURFACE 5819 #endif /* SURFACE_PRINCIPLED */ 5820 5821 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 5822 #define SURFACE_CLEARCOAT 5823 #define CLOSURE_NAME eevee_closure_clearcoat 5824 #define CLOSURE_GLOSSY 5825 #define CLOSURE_CLEARCOAT 5826 #endif /* SURFACE_CLEARCOAT */ 5827 5828 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 5829 #define SURFACE_DIFFUSE 5830 #define CLOSURE_NAME eevee_closure_diffuse 5831 #define CLOSURE_DIFFUSE 5832 #endif /* SURFACE_DIFFUSE */ 5833 5834 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 5835 #define SURFACE_SUBSURFACE 5836 #define CLOSURE_NAME eevee_closure_subsurface 5837 #define CLOSURE_DIFFUSE 5838 #define CLOSURE_SUBSURFACE 5839 #endif /* SURFACE_SUBSURFACE */ 5840 5841 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 5842 #define SURFACE_SKIN 5843 #define CLOSURE_NAME eevee_closure_skin 5844 #define CLOSURE_DIFFUSE 5845 #define CLOSURE_SUBSURFACE 5846 #define CLOSURE_GLOSSY 5847 #endif /* SURFACE_SKIN */ 5848 5849 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 5850 #define SURFACE_GLOSSY 5851 #define CLOSURE_NAME eevee_closure_glossy 5852 #define CLOSURE_GLOSSY 5853 #endif /* SURFACE_GLOSSY */ 5854 5855 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 5856 #define SURFACE_REFRACT 5857 #define CLOSURE_NAME eevee_closure_refraction 5858 #define CLOSURE_REFRACTION 5859 #endif /* SURFACE_REFRACT */ 5860 5861 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 5862 #define SURFACE_GLASS 5863 #define CLOSURE_NAME eevee_closure_glass 5864 #define CLOSURE_GLOSSY 5865 #define CLOSURE_REFRACTION 5866 #endif /* SURFACE_GLASS */ 5867 5868 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 5869 #ifdef CLOSURE_CLEARCOAT 5870 #ifndef CLOSURE_GLOSSY 5871 # define CLOSURE_GLOSSY 5872 #endif 5873 #endif /* CLOSURE_CLEARCOAT */ 5874 5875 void CLOSURE_NAME(vec3 N 5876 #ifdef CLOSURE_DIFFUSE 5877 , 5878 vec3 albedo 5879 #endif 5880 #ifdef CLOSURE_GLOSSY 5881 , 5882 vec3 f0, 5883 int ssr_id 5884 #endif 5885 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5886 , 5887 float roughness 5888 #endif 5889 #ifdef CLOSURE_CLEARCOAT 5890 , 5891 vec3 C_N, 5892 float C_intensity, 5893 float C_roughness 5894 #endif 5895 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 5896 , 5897 float ao 5898 #endif 5899 #ifdef CLOSURE_SUBSURFACE 5900 , 5901 float sss_scale 5902 #endif 5903 #ifdef CLOSURE_REFRACTION 5904 , 5905 float ior 5906 #endif 5907 #ifdef CLOSURE_DIFFUSE 5908 , 5909 out vec3 out_diff 5910 #endif 5911 #ifdef CLOSURE_SUBSURFACE 5912 , 5913 out vec3 out_trans 5914 #endif 5915 #ifdef CLOSURE_GLOSSY 5916 , 5917 out vec3 out_spec 5918 #endif 5919 #ifdef CLOSURE_REFRACTION 5920 , 5921 out vec3 out_refr 5922 #endif 5923 #ifdef CLOSURE_GLOSSY 5924 , 5925 out vec3 ssr_spec 5926 #endif 5927 ) 5928 { 5929 #ifdef CLOSURE_DIFFUSE 5930 out_diff = vec3(0.0); 5931 #endif 5932 5933 #ifdef CLOSURE_SUBSURFACE 5934 out_trans = vec3(0.0); 5935 #endif 5936 5937 #ifdef CLOSURE_GLOSSY 5938 out_spec = vec3(0.0); 5939 #endif 5940 5941 #ifdef CLOSURE_REFRACTION 5942 out_refr = vec3(0.0); 5943 #endif 5944 5945 #ifdef SHADOW_SHADER 5946 return; 5947 #endif 5948 5949 /* Zero length vectors cause issues, see: T51979. */ 5950 float len = length(N); 5951 if (isnan(len)) { 5952 return; 5953 } 5954 N /= len; 5955 5956 #ifdef CLOSURE_CLEARCOAT 5957 len = length(C_N); 5958 if (isnan(len)) { 5959 return; 5960 } 5961 C_N /= len; 5962 #endif 5963 5964 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 5965 roughness = clamp(roughness, 1e-8, 0.9999); 5966 float roughnessSquared = roughness * roughness; 5967 #endif 5968 5969 #ifdef CLOSURE_CLEARCOAT 5970 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 5971 float C_roughnessSquared = C_roughness * C_roughness; 5972 #endif 5973 5974 vec3 V = cameraVec; 5975 5976 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 5977 5978 /* ---------------------------------------------------------------- */ 5979 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 5980 /* ---------------------------------------------------------------- */ 5981 5982 #ifdef CLOSURE_GLOSSY 5983 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 5984 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 5985 #endif 5986 5987 #ifdef CLOSURE_CLEARCOAT 5988 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 5989 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 5990 vec3 out_spec_clear = vec3(0.0); 5991 #endif 5992 5993 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 5994 LightData ld = lights_data[i]; 5995 5996 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 5997 l_vector.xyz = ld.l_position - worldPosition; 5998 l_vector.w = length(l_vector.xyz); 5999 6000 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 6001 6002 if (l_vis < 1e-8) { 6003 continue; 6004 } 6005 6006 vec3 l_color_vis = ld.l_color * l_vis; 6007 6008 #ifdef CLOSURE_DIFFUSE 6009 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 6010 #endif 6011 6012 #ifdef CLOSURE_SUBSURFACE 6013 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 6014 #endif 6015 6016 #ifdef CLOSURE_GLOSSY 6017 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 6018 #endif 6019 6020 #ifdef CLOSURE_CLEARCOAT 6021 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 6022 ld.l_spec; 6023 #endif 6024 } 6025 6026 #ifdef CLOSURE_GLOSSY 6027 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 6028 out_spec *= F_area(f0, brdf_lut_lights.xy); 6029 #endif 6030 6031 #ifdef CLOSURE_CLEARCOAT 6032 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 6033 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 6034 out_spec += out_spec_clear * C_intensity; 6035 #endif 6036 6037 /* ---------------------------------------------------------------- */ 6038 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 6039 /* ---------------------------------------------------------------- */ 6040 6041 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 6042 #ifdef CLOSURE_GLOSSY 6043 vec4 spec_accum = vec4(0.0); 6044 #endif 6045 6046 #ifdef CLOSURE_CLEARCOAT 6047 vec4 C_spec_accum = vec4(0.0); 6048 #endif 6049 6050 #ifdef CLOSURE_REFRACTION 6051 vec4 refr_accum = vec4(0.0); 6052 #endif 6053 6054 #ifdef CLOSURE_GLOSSY 6055 /* ---------------------------- */ 6056 /* Planar Reflections */ 6057 /* ---------------------------- */ 6058 6059 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 6060 PlanarData pd = planars_data[i]; 6061 6062 /* Fade on geometric normal. */ 6063 float fade = probe_attenuation_planar( 6064 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 6065 6066 if (fade > 0.0) { 6067 if (!(ssrToggle && ssr_id == outputSsrId)) { 6068 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 6069 accumulate_light(spec, fade, spec_accum); 6070 } 6071 6072 #ifdef CLOSURE_CLEARCOAT 6073 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 6074 accumulate_light(C_spec, fade, C_spec_accum); 6075 #endif 6076 } 6077 } 6078 #endif 6079 6080 #ifdef CLOSURE_GLOSSY 6081 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 6082 #endif 6083 6084 #ifdef CLOSURE_CLEARCOAT 6085 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 6086 #endif 6087 6088 #ifdef CLOSURE_REFRACTION 6089 /* Refract the view vector using the depth heuristic. 6090 * Then later Refract a second time the already refracted 6091 * ray using the inverse ior. */ 6092 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 6093 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 6094 vec3 refr_pos = (refractionDepth > 0.0) ? 6095 line_plane_intersect( 6096 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 6097 worldPosition; 6098 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 6099 #endif 6100 6101 #ifdef CLOSURE_REFRACTION 6102 /* ---------------------------- */ 6103 /* Screen Space Refraction */ 6104 /* ---------------------------- */ 6105 #ifdef USE_REFRACTION 6106 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 6107 /* Find approximated position of the 2nd refraction event. */ 6108 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 6109 viewPosition; 6110 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 6111 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 6112 accumulate_light(trans.rgb, trans.a, refr_accum); 6113 } 6114 #endif 6115 6116 #endif 6117 6118 /* ---------------------------- */ 6119 /* Specular probes */ 6120 /* ---------------------------- */ 6121 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6122 6123 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 6124 # define GLASS_ACCUM 1 6125 # define ACCUM min(refr_accum.a, spec_accum.a) 6126 #elif defined(CLOSURE_REFRACTION) 6127 # define GLASS_ACCUM 0 6128 # define ACCUM refr_accum.a 6129 #else 6130 # define GLASS_ACCUM 0 6131 # define ACCUM spec_accum.a 6132 #endif 6133 6134 /* Starts at 1 because 0 is world probe */ 6135 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 6136 float fade = probe_attenuation_cube(i, worldPosition); 6137 6138 if (fade > 0.0) { 6139 6140 #if GLASS_ACCUM 6141 if (spec_accum.a < 0.999) { 6142 #endif 6143 #ifdef CLOSURE_GLOSSY 6144 if (!(ssrToggle && ssr_id == outputSsrId)) { 6145 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 6146 accumulate_light(spec, fade, spec_accum); 6147 } 6148 #endif 6149 6150 #ifdef CLOSURE_CLEARCOAT 6151 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 6152 accumulate_light(C_spec, fade, C_spec_accum); 6153 #endif 6154 #if GLASS_ACCUM 6155 } 6156 #endif 6157 6158 #if GLASS_ACCUM 6159 if (refr_accum.a < 0.999) { 6160 #endif 6161 #ifdef CLOSURE_REFRACTION 6162 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 6163 accumulate_light(trans, fade, refr_accum); 6164 #endif 6165 #if GLASS_ACCUM 6166 } 6167 #endif 6168 } 6169 } 6170 6171 #undef GLASS_ACCUM 6172 #undef ACCUM 6173 6174 /* ---------------------------- */ 6175 /* World Probe */ 6176 /* ---------------------------- */ 6177 #ifdef CLOSURE_GLOSSY 6178 if (spec_accum.a < 0.999) { 6179 if (!(ssrToggle && ssr_id == outputSsrId)) { 6180 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 6181 accumulate_light(spec, 1.0, spec_accum); 6182 } 6183 6184 # ifdef CLOSURE_CLEARCOAT 6185 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 6186 accumulate_light(C_spec, 1.0, C_spec_accum); 6187 # endif 6188 } 6189 #endif 6190 6191 #ifdef CLOSURE_REFRACTION 6192 if (refr_accum.a < 0.999) { 6193 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 6194 accumulate_light(trans, 1.0, refr_accum); 6195 } 6196 #endif 6197 #endif /* Specular probes */ 6198 6199 /* ---------------------------- */ 6200 /* Ambient Occlusion */ 6201 /* ---------------------------- */ 6202 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 6203 vec3 bent_normal; 6204 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 6205 #endif 6206 6207 /* ---------------------------- */ 6208 /* Specular Output */ 6209 /* ---------------------------- */ 6210 float NV = dot(N, V); 6211 #ifdef CLOSURE_GLOSSY 6212 vec2 uv = lut_coords(NV, roughness); 6213 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 6214 6215 /* This factor is outputted to be used by SSR in order 6216 * to match the intensity of the regular reflections. */ 6217 ssr_spec = F_ibl(f0, brdf_lut); 6218 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 6219 6220 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 6221 if (ssrToggle && ssr_id == outputSsrId) { 6222 spec_occlu = 1.0; 6223 } 6224 6225 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 6226 #endif 6227 6228 #ifdef CLOSURE_REFRACTION 6229 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 6230 6231 out_refr += refr_accum.rgb * btdf; 6232 #endif 6233 6234 #ifdef CLOSURE_CLEARCOAT 6235 NV = dot(C_N, V); 6236 vec2 C_uv = lut_coords(NV, C_roughness); 6237 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 6238 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 6239 6240 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 6241 #endif 6242 6243 #ifdef CLOSURE_GLOSSY 6244 /* Global toggle for lightprobe baking. */ 6245 out_spec *= float(specToggle); 6246 #endif 6247 6248 /* ---------------------------------------------------------------- */ 6249 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 6250 /* ---------------------------------------------------------------- */ 6251 6252 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 6253 #ifdef CLOSURE_DIFFUSE 6254 vec4 diff_accum = vec4(0.0); 6255 6256 /* ---------------------------- */ 6257 /* Irradiance Grids */ 6258 /* ---------------------------- */ 6259 /* Start at 1 because 0 is world irradiance */ 6260 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 6261 GridData gd = grids_data[i]; 6262 6263 vec3 localpos; 6264 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 6265 6266 if (fade > 0.0) { 6267 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 6268 accumulate_light(diff, fade, diff_accum); 6269 } 6270 } 6271 6272 /* ---------------------------- */ 6273 /* World Diffuse */ 6274 /* ---------------------------- */ 6275 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 6276 vec3 diff = probe_evaluate_world_diff(bent_normal); 6277 accumulate_light(diff, 1.0, diff_accum); 6278 } 6279 6280 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 6281 #endif 6282 } 6283 6284 /* Cleanup for next configuration */ 6285 #undef CLOSURE_NAME 6286 6287 #ifdef CLOSURE_DIFFUSE 6288 #undef CLOSURE_DIFFUSE 6289 #endif 6290 6291 #ifdef CLOSURE_GLOSSY 6292 #undef CLOSURE_GLOSSY 6293 #endif 6294 6295 #ifdef CLOSURE_CLEARCOAT 6296 #undef CLOSURE_CLEARCOAT 6297 #endif 6298 6299 #ifdef CLOSURE_REFRACTION 6300 #undef CLOSURE_REFRACTION 6301 #endif 6302 6303 #ifdef CLOSURE_SUBSURFACE 6304 #undef CLOSURE_SUBSURFACE 6305 #endif 6306 6307 #ifndef LIT_SURFACE_UNIFORM 6308 #define LIT_SURFACE_UNIFORM 6309 6310 uniform float refractionDepth; 6311 6312 #ifndef UTIL_TEX 6313 # define UTIL_TEX 6314 uniform sampler2DArray utilTex; 6315 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 6316 #endif /* UTIL_TEX */ 6317 6318 in vec3 worldPosition; 6319 in vec3 viewPosition; 6320 6321 #ifdef USE_FLAT_NORMAL 6322 flat in vec3 worldNormal; 6323 flat in vec3 viewNormal; 6324 #else 6325 in vec3 worldNormal; 6326 in vec3 viewNormal; 6327 #endif 6328 6329 #ifdef HAIR_SHADER 6330 in vec3 hairTangent; /* world space */ 6331 in float hairThickTime; 6332 in float hairThickness; 6333 in float hairTime; 6334 flat in int hairStrandID; 6335 6336 uniform int hairThicknessRes = 1; 6337 #endif 6338 6339 #endif /* LIT_SURFACE_UNIFORM */ 6340 6341 /** AUTO CONFIG 6342 * We include the file multiple times each time with a different configuration. 6343 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 6344 */ 6345 #if !defined(SURFACE_DEFAULT) 6346 #define SURFACE_DEFAULT 6347 #define CLOSURE_NAME eevee_closure_default 6348 #define CLOSURE_DIFFUSE 6349 #define CLOSURE_GLOSSY 6350 #endif /* SURFACE_DEFAULT */ 6351 6352 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 6353 #define SURFACE_PRINCIPLED 6354 #define CLOSURE_NAME eevee_closure_principled 6355 #define CLOSURE_DIFFUSE 6356 #define CLOSURE_GLOSSY 6357 #define CLOSURE_CLEARCOAT 6358 #define CLOSURE_REFRACTION 6359 #define CLOSURE_SUBSURFACE 6360 #endif /* SURFACE_PRINCIPLED */ 6361 6362 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 6363 #define SURFACE_CLEARCOAT 6364 #define CLOSURE_NAME eevee_closure_clearcoat 6365 #define CLOSURE_GLOSSY 6366 #define CLOSURE_CLEARCOAT 6367 #endif /* SURFACE_CLEARCOAT */ 6368 6369 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 6370 #define SURFACE_DIFFUSE 6371 #define CLOSURE_NAME eevee_closure_diffuse 6372 #define CLOSURE_DIFFUSE 6373 #endif /* SURFACE_DIFFUSE */ 6374 6375 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 6376 #define SURFACE_SUBSURFACE 6377 #define CLOSURE_NAME eevee_closure_subsurface 6378 #define CLOSURE_DIFFUSE 6379 #define CLOSURE_SUBSURFACE 6380 #endif /* SURFACE_SUBSURFACE */ 6381 6382 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 6383 #define SURFACE_SKIN 6384 #define CLOSURE_NAME eevee_closure_skin 6385 #define CLOSURE_DIFFUSE 6386 #define CLOSURE_SUBSURFACE 6387 #define CLOSURE_GLOSSY 6388 #endif /* SURFACE_SKIN */ 6389 6390 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 6391 #define SURFACE_GLOSSY 6392 #define CLOSURE_NAME eevee_closure_glossy 6393 #define CLOSURE_GLOSSY 6394 #endif /* SURFACE_GLOSSY */ 6395 6396 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 6397 #define SURFACE_REFRACT 6398 #define CLOSURE_NAME eevee_closure_refraction 6399 #define CLOSURE_REFRACTION 6400 #endif /* SURFACE_REFRACT */ 6401 6402 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 6403 #define SURFACE_GLASS 6404 #define CLOSURE_NAME eevee_closure_glass 6405 #define CLOSURE_GLOSSY 6406 #define CLOSURE_REFRACTION 6407 #endif /* SURFACE_GLASS */ 6408 6409 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 6410 #ifdef CLOSURE_CLEARCOAT 6411 #ifndef CLOSURE_GLOSSY 6412 # define CLOSURE_GLOSSY 6413 #endif 6414 #endif /* CLOSURE_CLEARCOAT */ 6415 6416 void CLOSURE_NAME(vec3 N 6417 #ifdef CLOSURE_DIFFUSE 6418 , 6419 vec3 albedo 6420 #endif 6421 #ifdef CLOSURE_GLOSSY 6422 , 6423 vec3 f0, 6424 int ssr_id 6425 #endif 6426 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6427 , 6428 float roughness 6429 #endif 6430 #ifdef CLOSURE_CLEARCOAT 6431 , 6432 vec3 C_N, 6433 float C_intensity, 6434 float C_roughness 6435 #endif 6436 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 6437 , 6438 float ao 6439 #endif 6440 #ifdef CLOSURE_SUBSURFACE 6441 , 6442 float sss_scale 6443 #endif 6444 #ifdef CLOSURE_REFRACTION 6445 , 6446 float ior 6447 #endif 6448 #ifdef CLOSURE_DIFFUSE 6449 , 6450 out vec3 out_diff 6451 #endif 6452 #ifdef CLOSURE_SUBSURFACE 6453 , 6454 out vec3 out_trans 6455 #endif 6456 #ifdef CLOSURE_GLOSSY 6457 , 6458 out vec3 out_spec 6459 #endif 6460 #ifdef CLOSURE_REFRACTION 6461 , 6462 out vec3 out_refr 6463 #endif 6464 #ifdef CLOSURE_GLOSSY 6465 , 6466 out vec3 ssr_spec 6467 #endif 6468 ) 6469 { 6470 #ifdef CLOSURE_DIFFUSE 6471 out_diff = vec3(0.0); 6472 #endif 6473 6474 #ifdef CLOSURE_SUBSURFACE 6475 out_trans = vec3(0.0); 6476 #endif 6477 6478 #ifdef CLOSURE_GLOSSY 6479 out_spec = vec3(0.0); 6480 #endif 6481 6482 #ifdef CLOSURE_REFRACTION 6483 out_refr = vec3(0.0); 6484 #endif 6485 6486 #ifdef SHADOW_SHADER 6487 return; 6488 #endif 6489 6490 /* Zero length vectors cause issues, see: T51979. */ 6491 float len = length(N); 6492 if (isnan(len)) { 6493 return; 6494 } 6495 N /= len; 6496 6497 #ifdef CLOSURE_CLEARCOAT 6498 len = length(C_N); 6499 if (isnan(len)) { 6500 return; 6501 } 6502 C_N /= len; 6503 #endif 6504 6505 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6506 roughness = clamp(roughness, 1e-8, 0.9999); 6507 float roughnessSquared = roughness * roughness; 6508 #endif 6509 6510 #ifdef CLOSURE_CLEARCOAT 6511 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 6512 float C_roughnessSquared = C_roughness * C_roughness; 6513 #endif 6514 6515 vec3 V = cameraVec; 6516 6517 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 6518 6519 /* ---------------------------------------------------------------- */ 6520 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 6521 /* ---------------------------------------------------------------- */ 6522 6523 #ifdef CLOSURE_GLOSSY 6524 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 6525 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 6526 #endif 6527 6528 #ifdef CLOSURE_CLEARCOAT 6529 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 6530 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 6531 vec3 out_spec_clear = vec3(0.0); 6532 #endif 6533 6534 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 6535 LightData ld = lights_data[i]; 6536 6537 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 6538 l_vector.xyz = ld.l_position - worldPosition; 6539 l_vector.w = length(l_vector.xyz); 6540 6541 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 6542 6543 if (l_vis < 1e-8) { 6544 continue; 6545 } 6546 6547 vec3 l_color_vis = ld.l_color * l_vis; 6548 6549 #ifdef CLOSURE_DIFFUSE 6550 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 6551 #endif 6552 6553 #ifdef CLOSURE_SUBSURFACE 6554 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 6555 #endif 6556 6557 #ifdef CLOSURE_GLOSSY 6558 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 6559 #endif 6560 6561 #ifdef CLOSURE_CLEARCOAT 6562 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 6563 ld.l_spec; 6564 #endif 6565 } 6566 6567 #ifdef CLOSURE_GLOSSY 6568 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 6569 out_spec *= F_area(f0, brdf_lut_lights.xy); 6570 #endif 6571 6572 #ifdef CLOSURE_CLEARCOAT 6573 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 6574 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 6575 out_spec += out_spec_clear * C_intensity; 6576 #endif 6577 6578 /* ---------------------------------------------------------------- */ 6579 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 6580 /* ---------------------------------------------------------------- */ 6581 6582 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 6583 #ifdef CLOSURE_GLOSSY 6584 vec4 spec_accum = vec4(0.0); 6585 #endif 6586 6587 #ifdef CLOSURE_CLEARCOAT 6588 vec4 C_spec_accum = vec4(0.0); 6589 #endif 6590 6591 #ifdef CLOSURE_REFRACTION 6592 vec4 refr_accum = vec4(0.0); 6593 #endif 6594 6595 #ifdef CLOSURE_GLOSSY 6596 /* ---------------------------- */ 6597 /* Planar Reflections */ 6598 /* ---------------------------- */ 6599 6600 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 6601 PlanarData pd = planars_data[i]; 6602 6603 /* Fade on geometric normal. */ 6604 float fade = probe_attenuation_planar( 6605 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 6606 6607 if (fade > 0.0) { 6608 if (!(ssrToggle && ssr_id == outputSsrId)) { 6609 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 6610 accumulate_light(spec, fade, spec_accum); 6611 } 6612 6613 #ifdef CLOSURE_CLEARCOAT 6614 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 6615 accumulate_light(C_spec, fade, C_spec_accum); 6616 #endif 6617 } 6618 } 6619 #endif 6620 6621 #ifdef CLOSURE_GLOSSY 6622 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 6623 #endif 6624 6625 #ifdef CLOSURE_CLEARCOAT 6626 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 6627 #endif 6628 6629 #ifdef CLOSURE_REFRACTION 6630 /* Refract the view vector using the depth heuristic. 6631 * Then later Refract a second time the already refracted 6632 * ray using the inverse ior. */ 6633 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 6634 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 6635 vec3 refr_pos = (refractionDepth > 0.0) ? 6636 line_plane_intersect( 6637 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 6638 worldPosition; 6639 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 6640 #endif 6641 6642 #ifdef CLOSURE_REFRACTION 6643 /* ---------------------------- */ 6644 /* Screen Space Refraction */ 6645 /* ---------------------------- */ 6646 #ifdef USE_REFRACTION 6647 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 6648 /* Find approximated position of the 2nd refraction event. */ 6649 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 6650 viewPosition; 6651 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 6652 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 6653 accumulate_light(trans.rgb, trans.a, refr_accum); 6654 } 6655 #endif 6656 6657 #endif 6658 6659 /* ---------------------------- */ 6660 /* Specular probes */ 6661 /* ---------------------------- */ 6662 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6663 6664 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 6665 # define GLASS_ACCUM 1 6666 # define ACCUM min(refr_accum.a, spec_accum.a) 6667 #elif defined(CLOSURE_REFRACTION) 6668 # define GLASS_ACCUM 0 6669 # define ACCUM refr_accum.a 6670 #else 6671 # define GLASS_ACCUM 0 6672 # define ACCUM spec_accum.a 6673 #endif 6674 6675 /* Starts at 1 because 0 is world probe */ 6676 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 6677 float fade = probe_attenuation_cube(i, worldPosition); 6678 6679 if (fade > 0.0) { 6680 6681 #if GLASS_ACCUM 6682 if (spec_accum.a < 0.999) { 6683 #endif 6684 #ifdef CLOSURE_GLOSSY 6685 if (!(ssrToggle && ssr_id == outputSsrId)) { 6686 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 6687 accumulate_light(spec, fade, spec_accum); 6688 } 6689 #endif 6690 6691 #ifdef CLOSURE_CLEARCOAT 6692 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 6693 accumulate_light(C_spec, fade, C_spec_accum); 6694 #endif 6695 #if GLASS_ACCUM 6696 } 6697 #endif 6698 6699 #if GLASS_ACCUM 6700 if (refr_accum.a < 0.999) { 6701 #endif 6702 #ifdef CLOSURE_REFRACTION 6703 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 6704 accumulate_light(trans, fade, refr_accum); 6705 #endif 6706 #if GLASS_ACCUM 6707 } 6708 #endif 6709 } 6710 } 6711 6712 #undef GLASS_ACCUM 6713 #undef ACCUM 6714 6715 /* ---------------------------- */ 6716 /* World Probe */ 6717 /* ---------------------------- */ 6718 #ifdef CLOSURE_GLOSSY 6719 if (spec_accum.a < 0.999) { 6720 if (!(ssrToggle && ssr_id == outputSsrId)) { 6721 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 6722 accumulate_light(spec, 1.0, spec_accum); 6723 } 6724 6725 # ifdef CLOSURE_CLEARCOAT 6726 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 6727 accumulate_light(C_spec, 1.0, C_spec_accum); 6728 # endif 6729 } 6730 #endif 6731 6732 #ifdef CLOSURE_REFRACTION 6733 if (refr_accum.a < 0.999) { 6734 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 6735 accumulate_light(trans, 1.0, refr_accum); 6736 } 6737 #endif 6738 #endif /* Specular probes */ 6739 6740 /* ---------------------------- */ 6741 /* Ambient Occlusion */ 6742 /* ---------------------------- */ 6743 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 6744 vec3 bent_normal; 6745 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 6746 #endif 6747 6748 /* ---------------------------- */ 6749 /* Specular Output */ 6750 /* ---------------------------- */ 6751 float NV = dot(N, V); 6752 #ifdef CLOSURE_GLOSSY 6753 vec2 uv = lut_coords(NV, roughness); 6754 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 6755 6756 /* This factor is outputted to be used by SSR in order 6757 * to match the intensity of the regular reflections. */ 6758 ssr_spec = F_ibl(f0, brdf_lut); 6759 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 6760 6761 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 6762 if (ssrToggle && ssr_id == outputSsrId) { 6763 spec_occlu = 1.0; 6764 } 6765 6766 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 6767 #endif 6768 6769 #ifdef CLOSURE_REFRACTION 6770 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 6771 6772 out_refr += refr_accum.rgb * btdf; 6773 #endif 6774 6775 #ifdef CLOSURE_CLEARCOAT 6776 NV = dot(C_N, V); 6777 vec2 C_uv = lut_coords(NV, C_roughness); 6778 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 6779 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 6780 6781 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 6782 #endif 6783 6784 #ifdef CLOSURE_GLOSSY 6785 /* Global toggle for lightprobe baking. */ 6786 out_spec *= float(specToggle); 6787 #endif 6788 6789 /* ---------------------------------------------------------------- */ 6790 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 6791 /* ---------------------------------------------------------------- */ 6792 6793 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 6794 #ifdef CLOSURE_DIFFUSE 6795 vec4 diff_accum = vec4(0.0); 6796 6797 /* ---------------------------- */ 6798 /* Irradiance Grids */ 6799 /* ---------------------------- */ 6800 /* Start at 1 because 0 is world irradiance */ 6801 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 6802 GridData gd = grids_data[i]; 6803 6804 vec3 localpos; 6805 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 6806 6807 if (fade > 0.0) { 6808 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 6809 accumulate_light(diff, fade, diff_accum); 6810 } 6811 } 6812 6813 /* ---------------------------- */ 6814 /* World Diffuse */ 6815 /* ---------------------------- */ 6816 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 6817 vec3 diff = probe_evaluate_world_diff(bent_normal); 6818 accumulate_light(diff, 1.0, diff_accum); 6819 } 6820 6821 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 6822 #endif 6823 } 6824 6825 /* Cleanup for next configuration */ 6826 #undef CLOSURE_NAME 6827 6828 #ifdef CLOSURE_DIFFUSE 6829 #undef CLOSURE_DIFFUSE 6830 #endif 6831 6832 #ifdef CLOSURE_GLOSSY 6833 #undef CLOSURE_GLOSSY 6834 #endif 6835 6836 #ifdef CLOSURE_CLEARCOAT 6837 #undef CLOSURE_CLEARCOAT 6838 #endif 6839 6840 #ifdef CLOSURE_REFRACTION 6841 #undef CLOSURE_REFRACTION 6842 #endif 6843 6844 #ifdef CLOSURE_SUBSURFACE 6845 #undef CLOSURE_SUBSURFACE 6846 #endif 6847 6848 #ifndef LIT_SURFACE_UNIFORM 6849 #define LIT_SURFACE_UNIFORM 6850 6851 uniform float refractionDepth; 6852 6853 #ifndef UTIL_TEX 6854 # define UTIL_TEX 6855 uniform sampler2DArray utilTex; 6856 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 6857 #endif /* UTIL_TEX */ 6858 6859 in vec3 worldPosition; 6860 in vec3 viewPosition; 6861 6862 #ifdef USE_FLAT_NORMAL 6863 flat in vec3 worldNormal; 6864 flat in vec3 viewNormal; 6865 #else 6866 in vec3 worldNormal; 6867 in vec3 viewNormal; 6868 #endif 6869 6870 #ifdef HAIR_SHADER 6871 in vec3 hairTangent; /* world space */ 6872 in float hairThickTime; 6873 in float hairThickness; 6874 in float hairTime; 6875 flat in int hairStrandID; 6876 6877 uniform int hairThicknessRes = 1; 6878 #endif 6879 6880 #endif /* LIT_SURFACE_UNIFORM */ 6881 6882 /** AUTO CONFIG 6883 * We include the file multiple times each time with a different configuration. 6884 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 6885 */ 6886 #if !defined(SURFACE_DEFAULT) 6887 #define SURFACE_DEFAULT 6888 #define CLOSURE_NAME eevee_closure_default 6889 #define CLOSURE_DIFFUSE 6890 #define CLOSURE_GLOSSY 6891 #endif /* SURFACE_DEFAULT */ 6892 6893 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 6894 #define SURFACE_PRINCIPLED 6895 #define CLOSURE_NAME eevee_closure_principled 6896 #define CLOSURE_DIFFUSE 6897 #define CLOSURE_GLOSSY 6898 #define CLOSURE_CLEARCOAT 6899 #define CLOSURE_REFRACTION 6900 #define CLOSURE_SUBSURFACE 6901 #endif /* SURFACE_PRINCIPLED */ 6902 6903 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 6904 #define SURFACE_CLEARCOAT 6905 #define CLOSURE_NAME eevee_closure_clearcoat 6906 #define CLOSURE_GLOSSY 6907 #define CLOSURE_CLEARCOAT 6908 #endif /* SURFACE_CLEARCOAT */ 6909 6910 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 6911 #define SURFACE_DIFFUSE 6912 #define CLOSURE_NAME eevee_closure_diffuse 6913 #define CLOSURE_DIFFUSE 6914 #endif /* SURFACE_DIFFUSE */ 6915 6916 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 6917 #define SURFACE_SUBSURFACE 6918 #define CLOSURE_NAME eevee_closure_subsurface 6919 #define CLOSURE_DIFFUSE 6920 #define CLOSURE_SUBSURFACE 6921 #endif /* SURFACE_SUBSURFACE */ 6922 6923 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 6924 #define SURFACE_SKIN 6925 #define CLOSURE_NAME eevee_closure_skin 6926 #define CLOSURE_DIFFUSE 6927 #define CLOSURE_SUBSURFACE 6928 #define CLOSURE_GLOSSY 6929 #endif /* SURFACE_SKIN */ 6930 6931 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 6932 #define SURFACE_GLOSSY 6933 #define CLOSURE_NAME eevee_closure_glossy 6934 #define CLOSURE_GLOSSY 6935 #endif /* SURFACE_GLOSSY */ 6936 6937 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 6938 #define SURFACE_REFRACT 6939 #define CLOSURE_NAME eevee_closure_refraction 6940 #define CLOSURE_REFRACTION 6941 #endif /* SURFACE_REFRACT */ 6942 6943 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 6944 #define SURFACE_GLASS 6945 #define CLOSURE_NAME eevee_closure_glass 6946 #define CLOSURE_GLOSSY 6947 #define CLOSURE_REFRACTION 6948 #endif /* SURFACE_GLASS */ 6949 6950 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 6951 #ifdef CLOSURE_CLEARCOAT 6952 #ifndef CLOSURE_GLOSSY 6953 # define CLOSURE_GLOSSY 6954 #endif 6955 #endif /* CLOSURE_CLEARCOAT */ 6956 6957 void CLOSURE_NAME(vec3 N 6958 #ifdef CLOSURE_DIFFUSE 6959 , 6960 vec3 albedo 6961 #endif 6962 #ifdef CLOSURE_GLOSSY 6963 , 6964 vec3 f0, 6965 int ssr_id 6966 #endif 6967 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 6968 , 6969 float roughness 6970 #endif 6971 #ifdef CLOSURE_CLEARCOAT 6972 , 6973 vec3 C_N, 6974 float C_intensity, 6975 float C_roughness 6976 #endif 6977 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 6978 , 6979 float ao 6980 #endif 6981 #ifdef CLOSURE_SUBSURFACE 6982 , 6983 float sss_scale 6984 #endif 6985 #ifdef CLOSURE_REFRACTION 6986 , 6987 float ior 6988 #endif 6989 #ifdef CLOSURE_DIFFUSE 6990 , 6991 out vec3 out_diff 6992 #endif 6993 #ifdef CLOSURE_SUBSURFACE 6994 , 6995 out vec3 out_trans 6996 #endif 6997 #ifdef CLOSURE_GLOSSY 6998 , 6999 out vec3 out_spec 7000 #endif 7001 #ifdef CLOSURE_REFRACTION 7002 , 7003 out vec3 out_refr 7004 #endif 7005 #ifdef CLOSURE_GLOSSY 7006 , 7007 out vec3 ssr_spec 7008 #endif 7009 ) 7010 { 7011 #ifdef CLOSURE_DIFFUSE 7012 out_diff = vec3(0.0); 7013 #endif 7014 7015 #ifdef CLOSURE_SUBSURFACE 7016 out_trans = vec3(0.0); 7017 #endif 7018 7019 #ifdef CLOSURE_GLOSSY 7020 out_spec = vec3(0.0); 7021 #endif 7022 7023 #ifdef CLOSURE_REFRACTION 7024 out_refr = vec3(0.0); 7025 #endif 7026 7027 #ifdef SHADOW_SHADER 7028 return; 7029 #endif 7030 7031 /* Zero length vectors cause issues, see: T51979. */ 7032 float len = length(N); 7033 if (isnan(len)) { 7034 return; 7035 } 7036 N /= len; 7037 7038 #ifdef CLOSURE_CLEARCOAT 7039 len = length(C_N); 7040 if (isnan(len)) { 7041 return; 7042 } 7043 C_N /= len; 7044 #endif 7045 7046 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7047 roughness = clamp(roughness, 1e-8, 0.9999); 7048 float roughnessSquared = roughness * roughness; 7049 #endif 7050 7051 #ifdef CLOSURE_CLEARCOAT 7052 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 7053 float C_roughnessSquared = C_roughness * C_roughness; 7054 #endif 7055 7056 vec3 V = cameraVec; 7057 7058 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 7059 7060 /* ---------------------------------------------------------------- */ 7061 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 7062 /* ---------------------------------------------------------------- */ 7063 7064 #ifdef CLOSURE_GLOSSY 7065 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 7066 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 7067 #endif 7068 7069 #ifdef CLOSURE_CLEARCOAT 7070 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 7071 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 7072 vec3 out_spec_clear = vec3(0.0); 7073 #endif 7074 7075 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 7076 LightData ld = lights_data[i]; 7077 7078 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 7079 l_vector.xyz = ld.l_position - worldPosition; 7080 l_vector.w = length(l_vector.xyz); 7081 7082 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 7083 7084 if (l_vis < 1e-8) { 7085 continue; 7086 } 7087 7088 vec3 l_color_vis = ld.l_color * l_vis; 7089 7090 #ifdef CLOSURE_DIFFUSE 7091 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 7092 #endif 7093 7094 #ifdef CLOSURE_SUBSURFACE 7095 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 7096 #endif 7097 7098 #ifdef CLOSURE_GLOSSY 7099 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 7100 #endif 7101 7102 #ifdef CLOSURE_CLEARCOAT 7103 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 7104 ld.l_spec; 7105 #endif 7106 } 7107 7108 #ifdef CLOSURE_GLOSSY 7109 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 7110 out_spec *= F_area(f0, brdf_lut_lights.xy); 7111 #endif 7112 7113 #ifdef CLOSURE_CLEARCOAT 7114 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 7115 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 7116 out_spec += out_spec_clear * C_intensity; 7117 #endif 7118 7119 /* ---------------------------------------------------------------- */ 7120 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 7121 /* ---------------------------------------------------------------- */ 7122 7123 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 7124 #ifdef CLOSURE_GLOSSY 7125 vec4 spec_accum = vec4(0.0); 7126 #endif 7127 7128 #ifdef CLOSURE_CLEARCOAT 7129 vec4 C_spec_accum = vec4(0.0); 7130 #endif 7131 7132 #ifdef CLOSURE_REFRACTION 7133 vec4 refr_accum = vec4(0.0); 7134 #endif 7135 7136 #ifdef CLOSURE_GLOSSY 7137 /* ---------------------------- */ 7138 /* Planar Reflections */ 7139 /* ---------------------------- */ 7140 7141 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 7142 PlanarData pd = planars_data[i]; 7143 7144 /* Fade on geometric normal. */ 7145 float fade = probe_attenuation_planar( 7146 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 7147 7148 if (fade > 0.0) { 7149 if (!(ssrToggle && ssr_id == outputSsrId)) { 7150 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 7151 accumulate_light(spec, fade, spec_accum); 7152 } 7153 7154 #ifdef CLOSURE_CLEARCOAT 7155 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 7156 accumulate_light(C_spec, fade, C_spec_accum); 7157 #endif 7158 } 7159 } 7160 #endif 7161 7162 #ifdef CLOSURE_GLOSSY 7163 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 7164 #endif 7165 7166 #ifdef CLOSURE_CLEARCOAT 7167 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 7168 #endif 7169 7170 #ifdef CLOSURE_REFRACTION 7171 /* Refract the view vector using the depth heuristic. 7172 * Then later Refract a second time the already refracted 7173 * ray using the inverse ior. */ 7174 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 7175 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 7176 vec3 refr_pos = (refractionDepth > 0.0) ? 7177 line_plane_intersect( 7178 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 7179 worldPosition; 7180 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 7181 #endif 7182 7183 #ifdef CLOSURE_REFRACTION 7184 /* ---------------------------- */ 7185 /* Screen Space Refraction */ 7186 /* ---------------------------- */ 7187 #ifdef USE_REFRACTION 7188 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 7189 /* Find approximated position of the 2nd refraction event. */ 7190 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 7191 viewPosition; 7192 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 7193 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 7194 accumulate_light(trans.rgb, trans.a, refr_accum); 7195 } 7196 #endif 7197 7198 #endif 7199 7200 /* ---------------------------- */ 7201 /* Specular probes */ 7202 /* ---------------------------- */ 7203 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7204 7205 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 7206 # define GLASS_ACCUM 1 7207 # define ACCUM min(refr_accum.a, spec_accum.a) 7208 #elif defined(CLOSURE_REFRACTION) 7209 # define GLASS_ACCUM 0 7210 # define ACCUM refr_accum.a 7211 #else 7212 # define GLASS_ACCUM 0 7213 # define ACCUM spec_accum.a 7214 #endif 7215 7216 /* Starts at 1 because 0 is world probe */ 7217 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 7218 float fade = probe_attenuation_cube(i, worldPosition); 7219 7220 if (fade > 0.0) { 7221 7222 #if GLASS_ACCUM 7223 if (spec_accum.a < 0.999) { 7224 #endif 7225 #ifdef CLOSURE_GLOSSY 7226 if (!(ssrToggle && ssr_id == outputSsrId)) { 7227 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 7228 accumulate_light(spec, fade, spec_accum); 7229 } 7230 #endif 7231 7232 #ifdef CLOSURE_CLEARCOAT 7233 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 7234 accumulate_light(C_spec, fade, C_spec_accum); 7235 #endif 7236 #if GLASS_ACCUM 7237 } 7238 #endif 7239 7240 #if GLASS_ACCUM 7241 if (refr_accum.a < 0.999) { 7242 #endif 7243 #ifdef CLOSURE_REFRACTION 7244 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 7245 accumulate_light(trans, fade, refr_accum); 7246 #endif 7247 #if GLASS_ACCUM 7248 } 7249 #endif 7250 } 7251 } 7252 7253 #undef GLASS_ACCUM 7254 #undef ACCUM 7255 7256 /* ---------------------------- */ 7257 /* World Probe */ 7258 /* ---------------------------- */ 7259 #ifdef CLOSURE_GLOSSY 7260 if (spec_accum.a < 0.999) { 7261 if (!(ssrToggle && ssr_id == outputSsrId)) { 7262 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 7263 accumulate_light(spec, 1.0, spec_accum); 7264 } 7265 7266 # ifdef CLOSURE_CLEARCOAT 7267 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 7268 accumulate_light(C_spec, 1.0, C_spec_accum); 7269 # endif 7270 } 7271 #endif 7272 7273 #ifdef CLOSURE_REFRACTION 7274 if (refr_accum.a < 0.999) { 7275 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 7276 accumulate_light(trans, 1.0, refr_accum); 7277 } 7278 #endif 7279 #endif /* Specular probes */ 7280 7281 /* ---------------------------- */ 7282 /* Ambient Occlusion */ 7283 /* ---------------------------- */ 7284 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 7285 vec3 bent_normal; 7286 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 7287 #endif 7288 7289 /* ---------------------------- */ 7290 /* Specular Output */ 7291 /* ---------------------------- */ 7292 float NV = dot(N, V); 7293 #ifdef CLOSURE_GLOSSY 7294 vec2 uv = lut_coords(NV, roughness); 7295 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 7296 7297 /* This factor is outputted to be used by SSR in order 7298 * to match the intensity of the regular reflections. */ 7299 ssr_spec = F_ibl(f0, brdf_lut); 7300 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 7301 7302 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 7303 if (ssrToggle && ssr_id == outputSsrId) { 7304 spec_occlu = 1.0; 7305 } 7306 7307 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 7308 #endif 7309 7310 #ifdef CLOSURE_REFRACTION 7311 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 7312 7313 out_refr += refr_accum.rgb * btdf; 7314 #endif 7315 7316 #ifdef CLOSURE_CLEARCOAT 7317 NV = dot(C_N, V); 7318 vec2 C_uv = lut_coords(NV, C_roughness); 7319 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 7320 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 7321 7322 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 7323 #endif 7324 7325 #ifdef CLOSURE_GLOSSY 7326 /* Global toggle for lightprobe baking. */ 7327 out_spec *= float(specToggle); 7328 #endif 7329 7330 /* ---------------------------------------------------------------- */ 7331 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 7332 /* ---------------------------------------------------------------- */ 7333 7334 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 7335 #ifdef CLOSURE_DIFFUSE 7336 vec4 diff_accum = vec4(0.0); 7337 7338 /* ---------------------------- */ 7339 /* Irradiance Grids */ 7340 /* ---------------------------- */ 7341 /* Start at 1 because 0 is world irradiance */ 7342 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 7343 GridData gd = grids_data[i]; 7344 7345 vec3 localpos; 7346 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 7347 7348 if (fade > 0.0) { 7349 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 7350 accumulate_light(diff, fade, diff_accum); 7351 } 7352 } 7353 7354 /* ---------------------------- */ 7355 /* World Diffuse */ 7356 /* ---------------------------- */ 7357 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 7358 vec3 diff = probe_evaluate_world_diff(bent_normal); 7359 accumulate_light(diff, 1.0, diff_accum); 7360 } 7361 7362 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 7363 #endif 7364 } 7365 7366 /* Cleanup for next configuration */ 7367 #undef CLOSURE_NAME 7368 7369 #ifdef CLOSURE_DIFFUSE 7370 #undef CLOSURE_DIFFUSE 7371 #endif 7372 7373 #ifdef CLOSURE_GLOSSY 7374 #undef CLOSURE_GLOSSY 7375 #endif 7376 7377 #ifdef CLOSURE_CLEARCOAT 7378 #undef CLOSURE_CLEARCOAT 7379 #endif 7380 7381 #ifdef CLOSURE_REFRACTION 7382 #undef CLOSURE_REFRACTION 7383 #endif 7384 7385 #ifdef CLOSURE_SUBSURFACE 7386 #undef CLOSURE_SUBSURFACE 7387 #endif 7388 7389 #ifndef LIT_SURFACE_UNIFORM 7390 #define LIT_SURFACE_UNIFORM 7391 7392 uniform float refractionDepth; 7393 7394 #ifndef UTIL_TEX 7395 # define UTIL_TEX 7396 uniform sampler2DArray utilTex; 7397 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 7398 #endif /* UTIL_TEX */ 7399 7400 in vec3 worldPosition; 7401 in vec3 viewPosition; 7402 7403 #ifdef USE_FLAT_NORMAL 7404 flat in vec3 worldNormal; 7405 flat in vec3 viewNormal; 7406 #else 7407 in vec3 worldNormal; 7408 in vec3 viewNormal; 7409 #endif 7410 7411 #ifdef HAIR_SHADER 7412 in vec3 hairTangent; /* world space */ 7413 in float hairThickTime; 7414 in float hairThickness; 7415 in float hairTime; 7416 flat in int hairStrandID; 7417 7418 uniform int hairThicknessRes = 1; 7419 #endif 7420 7421 #endif /* LIT_SURFACE_UNIFORM */ 7422 7423 /** AUTO CONFIG 7424 * We include the file multiple times each time with a different configuration. 7425 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 7426 */ 7427 #if !defined(SURFACE_DEFAULT) 7428 #define SURFACE_DEFAULT 7429 #define CLOSURE_NAME eevee_closure_default 7430 #define CLOSURE_DIFFUSE 7431 #define CLOSURE_GLOSSY 7432 #endif /* SURFACE_DEFAULT */ 7433 7434 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 7435 #define SURFACE_PRINCIPLED 7436 #define CLOSURE_NAME eevee_closure_principled 7437 #define CLOSURE_DIFFUSE 7438 #define CLOSURE_GLOSSY 7439 #define CLOSURE_CLEARCOAT 7440 #define CLOSURE_REFRACTION 7441 #define CLOSURE_SUBSURFACE 7442 #endif /* SURFACE_PRINCIPLED */ 7443 7444 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 7445 #define SURFACE_CLEARCOAT 7446 #define CLOSURE_NAME eevee_closure_clearcoat 7447 #define CLOSURE_GLOSSY 7448 #define CLOSURE_CLEARCOAT 7449 #endif /* SURFACE_CLEARCOAT */ 7450 7451 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 7452 #define SURFACE_DIFFUSE 7453 #define CLOSURE_NAME eevee_closure_diffuse 7454 #define CLOSURE_DIFFUSE 7455 #endif /* SURFACE_DIFFUSE */ 7456 7457 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 7458 #define SURFACE_SUBSURFACE 7459 #define CLOSURE_NAME eevee_closure_subsurface 7460 #define CLOSURE_DIFFUSE 7461 #define CLOSURE_SUBSURFACE 7462 #endif /* SURFACE_SUBSURFACE */ 7463 7464 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 7465 #define SURFACE_SKIN 7466 #define CLOSURE_NAME eevee_closure_skin 7467 #define CLOSURE_DIFFUSE 7468 #define CLOSURE_SUBSURFACE 7469 #define CLOSURE_GLOSSY 7470 #endif /* SURFACE_SKIN */ 7471 7472 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 7473 #define SURFACE_GLOSSY 7474 #define CLOSURE_NAME eevee_closure_glossy 7475 #define CLOSURE_GLOSSY 7476 #endif /* SURFACE_GLOSSY */ 7477 7478 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 7479 #define SURFACE_REFRACT 7480 #define CLOSURE_NAME eevee_closure_refraction 7481 #define CLOSURE_REFRACTION 7482 #endif /* SURFACE_REFRACT */ 7483 7484 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 7485 #define SURFACE_GLASS 7486 #define CLOSURE_NAME eevee_closure_glass 7487 #define CLOSURE_GLOSSY 7488 #define CLOSURE_REFRACTION 7489 #endif /* SURFACE_GLASS */ 7490 7491 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 7492 #ifdef CLOSURE_CLEARCOAT 7493 #ifndef CLOSURE_GLOSSY 7494 # define CLOSURE_GLOSSY 7495 #endif 7496 #endif /* CLOSURE_CLEARCOAT */ 7497 7498 void CLOSURE_NAME(vec3 N 7499 #ifdef CLOSURE_DIFFUSE 7500 , 7501 vec3 albedo 7502 #endif 7503 #ifdef CLOSURE_GLOSSY 7504 , 7505 vec3 f0, 7506 int ssr_id 7507 #endif 7508 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7509 , 7510 float roughness 7511 #endif 7512 #ifdef CLOSURE_CLEARCOAT 7513 , 7514 vec3 C_N, 7515 float C_intensity, 7516 float C_roughness 7517 #endif 7518 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 7519 , 7520 float ao 7521 #endif 7522 #ifdef CLOSURE_SUBSURFACE 7523 , 7524 float sss_scale 7525 #endif 7526 #ifdef CLOSURE_REFRACTION 7527 , 7528 float ior 7529 #endif 7530 #ifdef CLOSURE_DIFFUSE 7531 , 7532 out vec3 out_diff 7533 #endif 7534 #ifdef CLOSURE_SUBSURFACE 7535 , 7536 out vec3 out_trans 7537 #endif 7538 #ifdef CLOSURE_GLOSSY 7539 , 7540 out vec3 out_spec 7541 #endif 7542 #ifdef CLOSURE_REFRACTION 7543 , 7544 out vec3 out_refr 7545 #endif 7546 #ifdef CLOSURE_GLOSSY 7547 , 7548 out vec3 ssr_spec 7549 #endif 7550 ) 7551 { 7552 #ifdef CLOSURE_DIFFUSE 7553 out_diff = vec3(0.0); 7554 #endif 7555 7556 #ifdef CLOSURE_SUBSURFACE 7557 out_trans = vec3(0.0); 7558 #endif 7559 7560 #ifdef CLOSURE_GLOSSY 7561 out_spec = vec3(0.0); 7562 #endif 7563 7564 #ifdef CLOSURE_REFRACTION 7565 out_refr = vec3(0.0); 7566 #endif 7567 7568 #ifdef SHADOW_SHADER 7569 return; 7570 #endif 7571 7572 /* Zero length vectors cause issues, see: T51979. */ 7573 float len = length(N); 7574 if (isnan(len)) { 7575 return; 7576 } 7577 N /= len; 7578 7579 #ifdef CLOSURE_CLEARCOAT 7580 len = length(C_N); 7581 if (isnan(len)) { 7582 return; 7583 } 7584 C_N /= len; 7585 #endif 7586 7587 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7588 roughness = clamp(roughness, 1e-8, 0.9999); 7589 float roughnessSquared = roughness * roughness; 7590 #endif 7591 7592 #ifdef CLOSURE_CLEARCOAT 7593 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 7594 float C_roughnessSquared = C_roughness * C_roughness; 7595 #endif 7596 7597 vec3 V = cameraVec; 7598 7599 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 7600 7601 /* ---------------------------------------------------------------- */ 7602 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 7603 /* ---------------------------------------------------------------- */ 7604 7605 #ifdef CLOSURE_GLOSSY 7606 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 7607 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 7608 #endif 7609 7610 #ifdef CLOSURE_CLEARCOAT 7611 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 7612 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 7613 vec3 out_spec_clear = vec3(0.0); 7614 #endif 7615 7616 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 7617 LightData ld = lights_data[i]; 7618 7619 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 7620 l_vector.xyz = ld.l_position - worldPosition; 7621 l_vector.w = length(l_vector.xyz); 7622 7623 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 7624 7625 if (l_vis < 1e-8) { 7626 continue; 7627 } 7628 7629 vec3 l_color_vis = ld.l_color * l_vis; 7630 7631 #ifdef CLOSURE_DIFFUSE 7632 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 7633 #endif 7634 7635 #ifdef CLOSURE_SUBSURFACE 7636 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 7637 #endif 7638 7639 #ifdef CLOSURE_GLOSSY 7640 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 7641 #endif 7642 7643 #ifdef CLOSURE_CLEARCOAT 7644 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 7645 ld.l_spec; 7646 #endif 7647 } 7648 7649 #ifdef CLOSURE_GLOSSY 7650 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 7651 out_spec *= F_area(f0, brdf_lut_lights.xy); 7652 #endif 7653 7654 #ifdef CLOSURE_CLEARCOAT 7655 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 7656 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 7657 out_spec += out_spec_clear * C_intensity; 7658 #endif 7659 7660 /* ---------------------------------------------------------------- */ 7661 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 7662 /* ---------------------------------------------------------------- */ 7663 7664 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 7665 #ifdef CLOSURE_GLOSSY 7666 vec4 spec_accum = vec4(0.0); 7667 #endif 7668 7669 #ifdef CLOSURE_CLEARCOAT 7670 vec4 C_spec_accum = vec4(0.0); 7671 #endif 7672 7673 #ifdef CLOSURE_REFRACTION 7674 vec4 refr_accum = vec4(0.0); 7675 #endif 7676 7677 #ifdef CLOSURE_GLOSSY 7678 /* ---------------------------- */ 7679 /* Planar Reflections */ 7680 /* ---------------------------- */ 7681 7682 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 7683 PlanarData pd = planars_data[i]; 7684 7685 /* Fade on geometric normal. */ 7686 float fade = probe_attenuation_planar( 7687 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 7688 7689 if (fade > 0.0) { 7690 if (!(ssrToggle && ssr_id == outputSsrId)) { 7691 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 7692 accumulate_light(spec, fade, spec_accum); 7693 } 7694 7695 #ifdef CLOSURE_CLEARCOAT 7696 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 7697 accumulate_light(C_spec, fade, C_spec_accum); 7698 #endif 7699 } 7700 } 7701 #endif 7702 7703 #ifdef CLOSURE_GLOSSY 7704 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 7705 #endif 7706 7707 #ifdef CLOSURE_CLEARCOAT 7708 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 7709 #endif 7710 7711 #ifdef CLOSURE_REFRACTION 7712 /* Refract the view vector using the depth heuristic. 7713 * Then later Refract a second time the already refracted 7714 * ray using the inverse ior. */ 7715 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 7716 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 7717 vec3 refr_pos = (refractionDepth > 0.0) ? 7718 line_plane_intersect( 7719 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 7720 worldPosition; 7721 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 7722 #endif 7723 7724 #ifdef CLOSURE_REFRACTION 7725 /* ---------------------------- */ 7726 /* Screen Space Refraction */ 7727 /* ---------------------------- */ 7728 #ifdef USE_REFRACTION 7729 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 7730 /* Find approximated position of the 2nd refraction event. */ 7731 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 7732 viewPosition; 7733 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 7734 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 7735 accumulate_light(trans.rgb, trans.a, refr_accum); 7736 } 7737 #endif 7738 7739 #endif 7740 7741 /* ---------------------------- */ 7742 /* Specular probes */ 7743 /* ---------------------------- */ 7744 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 7745 7746 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 7747 # define GLASS_ACCUM 1 7748 # define ACCUM min(refr_accum.a, spec_accum.a) 7749 #elif defined(CLOSURE_REFRACTION) 7750 # define GLASS_ACCUM 0 7751 # define ACCUM refr_accum.a 7752 #else 7753 # define GLASS_ACCUM 0 7754 # define ACCUM spec_accum.a 7755 #endif 7756 7757 /* Starts at 1 because 0 is world probe */ 7758 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 7759 float fade = probe_attenuation_cube(i, worldPosition); 7760 7761 if (fade > 0.0) { 7762 7763 #if GLASS_ACCUM 7764 if (spec_accum.a < 0.999) { 7765 #endif 7766 #ifdef CLOSURE_GLOSSY 7767 if (!(ssrToggle && ssr_id == outputSsrId)) { 7768 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 7769 accumulate_light(spec, fade, spec_accum); 7770 } 7771 #endif 7772 7773 #ifdef CLOSURE_CLEARCOAT 7774 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 7775 accumulate_light(C_spec, fade, C_spec_accum); 7776 #endif 7777 #if GLASS_ACCUM 7778 } 7779 #endif 7780 7781 #if GLASS_ACCUM 7782 if (refr_accum.a < 0.999) { 7783 #endif 7784 #ifdef CLOSURE_REFRACTION 7785 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 7786 accumulate_light(trans, fade, refr_accum); 7787 #endif 7788 #if GLASS_ACCUM 7789 } 7790 #endif 7791 } 7792 } 7793 7794 #undef GLASS_ACCUM 7795 #undef ACCUM 7796 7797 /* ---------------------------- */ 7798 /* World Probe */ 7799 /* ---------------------------- */ 7800 #ifdef CLOSURE_GLOSSY 7801 if (spec_accum.a < 0.999) { 7802 if (!(ssrToggle && ssr_id == outputSsrId)) { 7803 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 7804 accumulate_light(spec, 1.0, spec_accum); 7805 } 7806 7807 # ifdef CLOSURE_CLEARCOAT 7808 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 7809 accumulate_light(C_spec, 1.0, C_spec_accum); 7810 # endif 7811 } 7812 #endif 7813 7814 #ifdef CLOSURE_REFRACTION 7815 if (refr_accum.a < 0.999) { 7816 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 7817 accumulate_light(trans, 1.0, refr_accum); 7818 } 7819 #endif 7820 #endif /* Specular probes */ 7821 7822 /* ---------------------------- */ 7823 /* Ambient Occlusion */ 7824 /* ---------------------------- */ 7825 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 7826 vec3 bent_normal; 7827 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 7828 #endif 7829 7830 /* ---------------------------- */ 7831 /* Specular Output */ 7832 /* ---------------------------- */ 7833 float NV = dot(N, V); 7834 #ifdef CLOSURE_GLOSSY 7835 vec2 uv = lut_coords(NV, roughness); 7836 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 7837 7838 /* This factor is outputted to be used by SSR in order 7839 * to match the intensity of the regular reflections. */ 7840 ssr_spec = F_ibl(f0, brdf_lut); 7841 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 7842 7843 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 7844 if (ssrToggle && ssr_id == outputSsrId) { 7845 spec_occlu = 1.0; 7846 } 7847 7848 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 7849 #endif 7850 7851 #ifdef CLOSURE_REFRACTION 7852 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 7853 7854 out_refr += refr_accum.rgb * btdf; 7855 #endif 7856 7857 #ifdef CLOSURE_CLEARCOAT 7858 NV = dot(C_N, V); 7859 vec2 C_uv = lut_coords(NV, C_roughness); 7860 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 7861 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 7862 7863 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 7864 #endif 7865 7866 #ifdef CLOSURE_GLOSSY 7867 /* Global toggle for lightprobe baking. */ 7868 out_spec *= float(specToggle); 7869 #endif 7870 7871 /* ---------------------------------------------------------------- */ 7872 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 7873 /* ---------------------------------------------------------------- */ 7874 7875 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 7876 #ifdef CLOSURE_DIFFUSE 7877 vec4 diff_accum = vec4(0.0); 7878 7879 /* ---------------------------- */ 7880 /* Irradiance Grids */ 7881 /* ---------------------------- */ 7882 /* Start at 1 because 0 is world irradiance */ 7883 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 7884 GridData gd = grids_data[i]; 7885 7886 vec3 localpos; 7887 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 7888 7889 if (fade > 0.0) { 7890 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 7891 accumulate_light(diff, fade, diff_accum); 7892 } 7893 } 7894 7895 /* ---------------------------- */ 7896 /* World Diffuse */ 7897 /* ---------------------------- */ 7898 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 7899 vec3 diff = probe_evaluate_world_diff(bent_normal); 7900 accumulate_light(diff, 1.0, diff_accum); 7901 } 7902 7903 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 7904 #endif 7905 } 7906 7907 /* Cleanup for next configuration */ 7908 #undef CLOSURE_NAME 7909 7910 #ifdef CLOSURE_DIFFUSE 7911 #undef CLOSURE_DIFFUSE 7912 #endif 7913 7914 #ifdef CLOSURE_GLOSSY 7915 #undef CLOSURE_GLOSSY 7916 #endif 7917 7918 #ifdef CLOSURE_CLEARCOAT 7919 #undef CLOSURE_CLEARCOAT 7920 #endif 7921 7922 #ifdef CLOSURE_REFRACTION 7923 #undef CLOSURE_REFRACTION 7924 #endif 7925 7926 #ifdef CLOSURE_SUBSURFACE 7927 #undef CLOSURE_SUBSURFACE 7928 #endif 7929 7930 #ifndef LIT_SURFACE_UNIFORM 7931 #define LIT_SURFACE_UNIFORM 7932 7933 uniform float refractionDepth; 7934 7935 #ifndef UTIL_TEX 7936 # define UTIL_TEX 7937 uniform sampler2DArray utilTex; 7938 # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) 7939 #endif /* UTIL_TEX */ 7940 7941 in vec3 worldPosition; 7942 in vec3 viewPosition; 7943 7944 #ifdef USE_FLAT_NORMAL 7945 flat in vec3 worldNormal; 7946 flat in vec3 viewNormal; 7947 #else 7948 in vec3 worldNormal; 7949 in vec3 viewNormal; 7950 #endif 7951 7952 #ifdef HAIR_SHADER 7953 in vec3 hairTangent; /* world space */ 7954 in float hairThickTime; 7955 in float hairThickness; 7956 in float hairTime; 7957 flat in int hairStrandID; 7958 7959 uniform int hairThicknessRes = 1; 7960 #endif 7961 7962 #endif /* LIT_SURFACE_UNIFORM */ 7963 7964 /** AUTO CONFIG 7965 * We include the file multiple times each time with a different configuration. 7966 * This leads to a lot of deadcode. Better idea would be to only generate the one needed. 7967 */ 7968 #if !defined(SURFACE_DEFAULT) 7969 #define SURFACE_DEFAULT 7970 #define CLOSURE_NAME eevee_closure_default 7971 #define CLOSURE_DIFFUSE 7972 #define CLOSURE_GLOSSY 7973 #endif /* SURFACE_DEFAULT */ 7974 7975 #if !defined(SURFACE_PRINCIPLED) && !defined(CLOSURE_NAME) 7976 #define SURFACE_PRINCIPLED 7977 #define CLOSURE_NAME eevee_closure_principled 7978 #define CLOSURE_DIFFUSE 7979 #define CLOSURE_GLOSSY 7980 #define CLOSURE_CLEARCOAT 7981 #define CLOSURE_REFRACTION 7982 #define CLOSURE_SUBSURFACE 7983 #endif /* SURFACE_PRINCIPLED */ 7984 7985 #if !defined(SURFACE_CLEARCOAT) && !defined(CLOSURE_NAME) 7986 #define SURFACE_CLEARCOAT 7987 #define CLOSURE_NAME eevee_closure_clearcoat 7988 #define CLOSURE_GLOSSY 7989 #define CLOSURE_CLEARCOAT 7990 #endif /* SURFACE_CLEARCOAT */ 7991 7992 #if !defined(SURFACE_DIFFUSE) && !defined(CLOSURE_NAME) 7993 #define SURFACE_DIFFUSE 7994 #define CLOSURE_NAME eevee_closure_diffuse 7995 #define CLOSURE_DIFFUSE 7996 #endif /* SURFACE_DIFFUSE */ 7997 7998 #if !defined(SURFACE_SUBSURFACE) && !defined(CLOSURE_NAME) 7999 #define SURFACE_SUBSURFACE 8000 #define CLOSURE_NAME eevee_closure_subsurface 8001 #define CLOSURE_DIFFUSE 8002 #define CLOSURE_SUBSURFACE 8003 #endif /* SURFACE_SUBSURFACE */ 8004 8005 #if !defined(SURFACE_SKIN) && !defined(CLOSURE_NAME) 8006 #define SURFACE_SKIN 8007 #define CLOSURE_NAME eevee_closure_skin 8008 #define CLOSURE_DIFFUSE 8009 #define CLOSURE_SUBSURFACE 8010 #define CLOSURE_GLOSSY 8011 #endif /* SURFACE_SKIN */ 8012 8013 #if !defined(SURFACE_GLOSSY) && !defined(CLOSURE_NAME) 8014 #define SURFACE_GLOSSY 8015 #define CLOSURE_NAME eevee_closure_glossy 8016 #define CLOSURE_GLOSSY 8017 #endif /* SURFACE_GLOSSY */ 8018 8019 #if !defined(SURFACE_REFRACT) && !defined(CLOSURE_NAME) 8020 #define SURFACE_REFRACT 8021 #define CLOSURE_NAME eevee_closure_refraction 8022 #define CLOSURE_REFRACTION 8023 #endif /* SURFACE_REFRACT */ 8024 8025 #if !defined(SURFACE_GLASS) && !defined(CLOSURE_NAME) 8026 #define SURFACE_GLASS 8027 #define CLOSURE_NAME eevee_closure_glass 8028 #define CLOSURE_GLOSSY 8029 #define CLOSURE_REFRACTION 8030 #endif /* SURFACE_GLASS */ 8031 8032 /* Safety : CLOSURE_CLEARCOAT implies CLOSURE_GLOSSY */ 8033 #ifdef CLOSURE_CLEARCOAT 8034 #ifndef CLOSURE_GLOSSY 8035 # define CLOSURE_GLOSSY 8036 #endif 8037 #endif /* CLOSURE_CLEARCOAT */ 8038 8039 void CLOSURE_NAME(vec3 N 8040 #ifdef CLOSURE_DIFFUSE 8041 , 8042 vec3 albedo 8043 #endif 8044 #ifdef CLOSURE_GLOSSY 8045 , 8046 vec3 f0, 8047 int ssr_id 8048 #endif 8049 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 8050 , 8051 float roughness 8052 #endif 8053 #ifdef CLOSURE_CLEARCOAT 8054 , 8055 vec3 C_N, 8056 float C_intensity, 8057 float C_roughness 8058 #endif 8059 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 8060 , 8061 float ao 8062 #endif 8063 #ifdef CLOSURE_SUBSURFACE 8064 , 8065 float sss_scale 8066 #endif 8067 #ifdef CLOSURE_REFRACTION 8068 , 8069 float ior 8070 #endif 8071 #ifdef CLOSURE_DIFFUSE 8072 , 8073 out vec3 out_diff 8074 #endif 8075 #ifdef CLOSURE_SUBSURFACE 8076 , 8077 out vec3 out_trans 8078 #endif 8079 #ifdef CLOSURE_GLOSSY 8080 , 8081 out vec3 out_spec 8082 #endif 8083 #ifdef CLOSURE_REFRACTION 8084 , 8085 out vec3 out_refr 8086 #endif 8087 #ifdef CLOSURE_GLOSSY 8088 , 8089 out vec3 ssr_spec 8090 #endif 8091 ) 8092 { 8093 #ifdef CLOSURE_DIFFUSE 8094 out_diff = vec3(0.0); 8095 #endif 8096 8097 #ifdef CLOSURE_SUBSURFACE 8098 out_trans = vec3(0.0); 8099 #endif 8100 8101 #ifdef CLOSURE_GLOSSY 8102 out_spec = vec3(0.0); 8103 #endif 8104 8105 #ifdef CLOSURE_REFRACTION 8106 out_refr = vec3(0.0); 8107 #endif 8108 8109 #ifdef SHADOW_SHADER 8110 return; 8111 #endif 8112 8113 /* Zero length vectors cause issues, see: T51979. */ 8114 float len = length(N); 8115 if (isnan(len)) { 8116 return; 8117 } 8118 N /= len; 8119 8120 #ifdef CLOSURE_CLEARCOAT 8121 len = length(C_N); 8122 if (isnan(len)) { 8123 return; 8124 } 8125 C_N /= len; 8126 #endif 8127 8128 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 8129 roughness = clamp(roughness, 1e-8, 0.9999); 8130 float roughnessSquared = roughness * roughness; 8131 #endif 8132 8133 #ifdef CLOSURE_CLEARCOAT 8134 C_roughness = clamp(C_roughness, 1e-8, 0.9999); 8135 float C_roughnessSquared = C_roughness * C_roughness; 8136 #endif 8137 8138 vec3 V = cameraVec; 8139 8140 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 8141 8142 /* ---------------------------------------------------------------- */ 8143 /* -------------------- SCENE LIGHTS LIGHTING --------------------- */ 8144 /* ---------------------------------------------------------------- */ 8145 8146 #ifdef CLOSURE_GLOSSY 8147 vec2 lut_uv = lut_coords_ltc(dot(N, V), roughness); 8148 vec4 ltc_mat = texture(utilTex, vec3(lut_uv, 0.0)).rgba; 8149 #endif 8150 8151 #ifdef CLOSURE_CLEARCOAT 8152 vec2 lut_uv_clear = lut_coords_ltc(dot(C_N, V), C_roughness); 8153 vec4 ltc_mat_clear = texture(utilTex, vec3(lut_uv_clear, 0.0)).rgba; 8154 vec3 out_spec_clear = vec3(0.0); 8155 #endif 8156 8157 for (int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) { 8158 LightData ld = lights_data[i]; 8159 8160 vec4 l_vector; /* Non-Normalized Light Vector with length in last component. */ 8161 l_vector.xyz = ld.l_position - worldPosition; 8162 l_vector.w = length(l_vector.xyz); 8163 8164 float l_vis = light_visibility(ld, worldPosition, viewPosition, viewNormal, l_vector); 8165 8166 if (l_vis < 1e-8) { 8167 continue; 8168 } 8169 8170 vec3 l_color_vis = ld.l_color * l_vis; 8171 8172 #ifdef CLOSURE_DIFFUSE 8173 out_diff += l_color_vis * light_diffuse(ld, N, V, l_vector); 8174 #endif 8175 8176 #ifdef CLOSURE_SUBSURFACE 8177 out_trans += ld.l_color * light_translucent(ld, worldPosition, -N, l_vector, sss_scale); 8178 #endif 8179 8180 #ifdef CLOSURE_GLOSSY 8181 out_spec += l_color_vis * light_specular(ld, ltc_mat, N, V, l_vector) * ld.l_spec; 8182 #endif 8183 8184 #ifdef CLOSURE_CLEARCOAT 8185 out_spec_clear += l_color_vis * light_specular(ld, ltc_mat_clear, C_N, V, l_vector) * 8186 ld.l_spec; 8187 #endif 8188 } 8189 8190 #ifdef CLOSURE_GLOSSY 8191 vec2 brdf_lut_lights = texture(utilTex, vec3(lut_uv, 1.0)).ba; 8192 out_spec *= F_area(f0, brdf_lut_lights.xy); 8193 #endif 8194 8195 #ifdef CLOSURE_CLEARCOAT 8196 vec2 brdf_lut_lights_clear = texture(utilTex, vec3(lut_uv_clear, 1.0)).ba; 8197 out_spec_clear *= F_area(vec3(0.04), brdf_lut_lights_clear.xy); 8198 out_spec += out_spec_clear * C_intensity; 8199 #endif 8200 8201 /* ---------------------------------------------------------------- */ 8202 /* ---------------- SPECULAR ENVIRONMENT LIGHTING ----------------- */ 8203 /* ---------------------------------------------------------------- */ 8204 8205 /* Accumulate incoming light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 8206 #ifdef CLOSURE_GLOSSY 8207 vec4 spec_accum = vec4(0.0); 8208 #endif 8209 8210 #ifdef CLOSURE_CLEARCOAT 8211 vec4 C_spec_accum = vec4(0.0); 8212 #endif 8213 8214 #ifdef CLOSURE_REFRACTION 8215 vec4 refr_accum = vec4(0.0); 8216 #endif 8217 8218 #ifdef CLOSURE_GLOSSY 8219 /* ---------------------------- */ 8220 /* Planar Reflections */ 8221 /* ---------------------------- */ 8222 8223 for (int i = 0; i < MAX_PLANAR && i < prbNumPlanar && spec_accum.a < 0.999; ++i) { 8224 PlanarData pd = planars_data[i]; 8225 8226 /* Fade on geometric normal. */ 8227 float fade = probe_attenuation_planar( 8228 pd, worldPosition, (gl_FrontFacing) ? worldNormal : -worldNormal, roughness); 8229 8230 if (fade > 0.0) { 8231 if (!(ssrToggle && ssr_id == outputSsrId)) { 8232 vec3 spec = probe_evaluate_planar(float(i), pd, worldPosition, N, V, roughness, fade); 8233 accumulate_light(spec, fade, spec_accum); 8234 } 8235 8236 #ifdef CLOSURE_CLEARCOAT 8237 vec3 C_spec = probe_evaluate_planar(float(i), pd, worldPosition, C_N, V, C_roughness, fade); 8238 accumulate_light(C_spec, fade, C_spec_accum); 8239 #endif 8240 } 8241 } 8242 #endif 8243 8244 #ifdef CLOSURE_GLOSSY 8245 vec3 spec_dir = get_specular_reflection_dominant_dir(N, V, roughnessSquared); 8246 #endif 8247 8248 #ifdef CLOSURE_CLEARCOAT 8249 vec3 C_spec_dir = get_specular_reflection_dominant_dir(C_N, V, C_roughnessSquared); 8250 #endif 8251 8252 #ifdef CLOSURE_REFRACTION 8253 /* Refract the view vector using the depth heuristic. 8254 * Then later Refract a second time the already refracted 8255 * ray using the inverse ior. */ 8256 float final_ior = (refractionDepth > 0.0) ? 1.0 / ior : ior; 8257 vec3 refr_V = (refractionDepth > 0.0) ? -refract(-V, N, final_ior) : V; 8258 vec3 refr_pos = (refractionDepth > 0.0) ? 8259 line_plane_intersect( 8260 worldPosition, refr_V, worldPosition - N * refractionDepth, N) : 8261 worldPosition; 8262 vec3 refr_dir = get_specular_refraction_dominant_dir(N, refr_V, roughness, final_ior); 8263 #endif 8264 8265 #ifdef CLOSURE_REFRACTION 8266 /* ---------------------------- */ 8267 /* Screen Space Refraction */ 8268 /* ---------------------------- */ 8269 #ifdef USE_REFRACTION 8270 if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { 8271 /* Find approximated position of the 2nd refraction event. */ 8272 vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : 8273 viewPosition; 8274 vec4 trans = screen_space_refraction(refr_vpos, N, refr_V, final_ior, roughnessSquared, rand); 8275 trans.a *= smoothstep(ssrMaxRoughness + 0.2, ssrMaxRoughness, roughness); 8276 accumulate_light(trans.rgb, trans.a, refr_accum); 8277 } 8278 #endif 8279 8280 #endif 8281 8282 /* ---------------------------- */ 8283 /* Specular probes */ 8284 /* ---------------------------- */ 8285 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_REFRACTION) 8286 8287 #if defined(CLOSURE_GLOSSY) && defined(CLOSURE_REFRACTION) 8288 # define GLASS_ACCUM 1 8289 # define ACCUM min(refr_accum.a, spec_accum.a) 8290 #elif defined(CLOSURE_REFRACTION) 8291 # define GLASS_ACCUM 0 8292 # define ACCUM refr_accum.a 8293 #else 8294 # define GLASS_ACCUM 0 8295 # define ACCUM spec_accum.a 8296 #endif 8297 8298 /* Starts at 1 because 0 is world probe */ 8299 for (int i = 1; ACCUM < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { 8300 float fade = probe_attenuation_cube(i, worldPosition); 8301 8302 if (fade > 0.0) { 8303 8304 #if GLASS_ACCUM 8305 if (spec_accum.a < 0.999) { 8306 #endif 8307 #ifdef CLOSURE_GLOSSY 8308 if (!(ssrToggle && ssr_id == outputSsrId)) { 8309 vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); 8310 accumulate_light(spec, fade, spec_accum); 8311 } 8312 #endif 8313 8314 #ifdef CLOSURE_CLEARCOAT 8315 vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); 8316 accumulate_light(C_spec, fade, C_spec_accum); 8317 #endif 8318 #if GLASS_ACCUM 8319 } 8320 #endif 8321 8322 #if GLASS_ACCUM 8323 if (refr_accum.a < 0.999) { 8324 #endif 8325 #ifdef CLOSURE_REFRACTION 8326 vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); 8327 accumulate_light(trans, fade, refr_accum); 8328 #endif 8329 #if GLASS_ACCUM 8330 } 8331 #endif 8332 } 8333 } 8334 8335 #undef GLASS_ACCUM 8336 #undef ACCUM 8337 8338 /* ---------------------------- */ 8339 /* World Probe */ 8340 /* ---------------------------- */ 8341 #ifdef CLOSURE_GLOSSY 8342 if (spec_accum.a < 0.999) { 8343 if (!(ssrToggle && ssr_id == outputSsrId)) { 8344 vec3 spec = probe_evaluate_world_spec(spec_dir, roughness); 8345 accumulate_light(spec, 1.0, spec_accum); 8346 } 8347 8348 # ifdef CLOSURE_CLEARCOAT 8349 vec3 C_spec = probe_evaluate_world_spec(C_spec_dir, C_roughness); 8350 accumulate_light(C_spec, 1.0, C_spec_accum); 8351 # endif 8352 } 8353 #endif 8354 8355 #ifdef CLOSURE_REFRACTION 8356 if (refr_accum.a < 0.999) { 8357 vec3 trans = probe_evaluate_world_spec(refr_dir, roughnessSquared); 8358 accumulate_light(trans, 1.0, refr_accum); 8359 } 8360 #endif 8361 #endif /* Specular probes */ 8362 8363 /* ---------------------------- */ 8364 /* Ambient Occlusion */ 8365 /* ---------------------------- */ 8366 #if defined(CLOSURE_GLOSSY) || defined(CLOSURE_DIFFUSE) 8367 vec3 bent_normal; 8368 float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); 8369 #endif 8370 8371 /* ---------------------------- */ 8372 /* Specular Output */ 8373 /* ---------------------------- */ 8374 float NV = dot(N, V); 8375 #ifdef CLOSURE_GLOSSY 8376 vec2 uv = lut_coords(NV, roughness); 8377 vec2 brdf_lut = texture(utilTex, vec3(uv, 1.0)).rg; 8378 8379 /* This factor is outputted to be used by SSR in order 8380 * to match the intensity of the regular reflections. */ 8381 ssr_spec = F_ibl(f0, brdf_lut); 8382 float spec_occlu = specular_occlusion(NV, final_ao, roughness); 8383 8384 /* The SSR pass recompute the occlusion to not apply it to the SSR */ 8385 if (ssrToggle && ssr_id == outputSsrId) { 8386 spec_occlu = 1.0; 8387 } 8388 8389 out_spec += spec_accum.rgb * ssr_spec * spec_occlu; 8390 #endif 8391 8392 #ifdef CLOSURE_REFRACTION 8393 float btdf = get_btdf_lut(utilTex, NV, roughness, ior); 8394 8395 out_refr += refr_accum.rgb * btdf; 8396 #endif 8397 8398 #ifdef CLOSURE_CLEARCOAT 8399 NV = dot(C_N, V); 8400 vec2 C_uv = lut_coords(NV, C_roughness); 8401 vec2 C_brdf_lut = texture(utilTex, vec3(C_uv, 1.0)).rg; 8402 vec3 C_fresnel = F_ibl(vec3(0.04), C_brdf_lut) * specular_occlusion(NV, final_ao, C_roughness); 8403 8404 out_spec += C_spec_accum.rgb * C_fresnel * C_intensity; 8405 #endif 8406 8407 #ifdef CLOSURE_GLOSSY 8408 /* Global toggle for lightprobe baking. */ 8409 out_spec *= float(specToggle); 8410 #endif 8411 8412 /* ---------------------------------------------------------------- */ 8413 /* ---------------- DIFFUSE ENVIRONMENT LIGHTING ------------------ */ 8414 /* ---------------------------------------------------------------- */ 8415 8416 /* Accumulate light from all sources until accumulator is full. Then apply Occlusion and BRDF. */ 8417 #ifdef CLOSURE_DIFFUSE 8418 vec4 diff_accum = vec4(0.0); 8419 8420 /* ---------------------------- */ 8421 /* Irradiance Grids */ 8422 /* ---------------------------- */ 8423 /* Start at 1 because 0 is world irradiance */ 8424 for (int i = 1; i < MAX_GRID && i < prbNumRenderGrid && diff_accum.a < 0.999; ++i) { 8425 GridData gd = grids_data[i]; 8426 8427 vec3 localpos; 8428 float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); 8429 8430 if (fade > 0.0) { 8431 vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); 8432 accumulate_light(diff, fade, diff_accum); 8433 } 8434 } 8435 8436 /* ---------------------------- */ 8437 /* World Diffuse */ 8438 /* ---------------------------- */ 8439 if (diff_accum.a < 0.999 && prbNumRenderGrid > 0) { 8440 vec3 diff = probe_evaluate_world_diff(bent_normal); 8441 accumulate_light(diff, 1.0, diff_accum); 8442 } 8443 8444 out_diff += diff_accum.rgb * gtao_multibounce(final_ao, albedo); 8445 #endif 8446 } 8447 8448 /* Cleanup for next configuration */ 8449 #undef CLOSURE_NAME 8450 8451 #ifdef CLOSURE_DIFFUSE 8452 #undef CLOSURE_DIFFUSE 8453 #endif 8454 8455 #ifdef CLOSURE_GLOSSY 8456 #undef CLOSURE_GLOSSY 8457 #endif 8458 8459 #ifdef CLOSURE_CLEARCOAT 8460 #undef CLOSURE_CLEARCOAT 8461 #endif 8462 8463 #ifdef CLOSURE_REFRACTION 8464 #undef CLOSURE_REFRACTION 8465 #endif 8466 8467 #ifdef CLOSURE_SUBSURFACE 8468 #undef CLOSURE_SUBSURFACE 8469 #endif 8470 8471 /* Based on Frosbite Unified Volumetric. 8472 * https://www.ea.com/frostbite/news/physically-based-unified-volumetric-rendering-in-frostbite */ 8473 8474 /* Volume slice to view space depth. */ 8475 float volume_z_to_view_z(float z) 8476 { 8477 if (ProjectionMatrix[3][3] == 0.0) { 8478 /* Exponential distribution */ 8479 return (exp2(z / volDepthParameters.z) - volDepthParameters.x) / volDepthParameters.y; 8480 } 8481 else { 8482 /* Linear distribution */ 8483 return mix(volDepthParameters.x, volDepthParameters.y, z); 8484 } 8485 } 8486 8487 float view_z_to_volume_z(float depth) 8488 { 8489 if (ProjectionMatrix[3][3] == 0.0) { 8490 /* Exponential distribution */ 8491 return volDepthParameters.z * log2(depth * volDepthParameters.y + volDepthParameters.x); 8492 } 8493 else { 8494 /* Linear distribution */ 8495 return (depth - volDepthParameters.x) * volDepthParameters.z; 8496 } 8497 } 8498 8499 /* Volume texture normalized coordinates to NDC (special range [0, 1]). */ 8500 vec3 volume_to_ndc(vec3 cos) 8501 { 8502 cos.z = volume_z_to_view_z(cos.z); 8503 cos.z = get_depth_from_view_z(cos.z); 8504 cos.xy /= volCoordScale.xy; 8505 return cos; 8506 } 8507 8508 vec3 ndc_to_volume(vec3 cos) 8509 { 8510 cos.z = get_view_z_from_depth(cos.z); 8511 cos.z = view_z_to_volume_z(cos.z); 8512 cos.xy *= volCoordScale.xy; 8513 return cos; 8514 } 8515 8516 float phase_function_isotropic() 8517 { 8518 return 1.0 / (4.0 * M_PI); 8519 } 8520 8521 float phase_function(vec3 v, vec3 l, float g) 8522 { 8523 /* Henyey-Greenstein */ 8524 float cos_theta = dot(v, l); 8525 g = clamp(g, -1.0 + 1e-3, 1.0 - 1e-3); 8526 float sqr_g = g * g; 8527 return (1 - sqr_g) / max(1e-8, 4.0 * M_PI * pow(1 + sqr_g - 2 * g * cos_theta, 3.0 / 2.0)); 8528 } 8529 8530 #ifdef LAMPS_LIB 8531 vec3 light_volume(LightData ld, vec4 l_vector) 8532 { 8533 float power; 8534 /* TODO : Area lighting ? */ 8535 /* XXX : Removing Area Power. */ 8536 /* TODO : put this out of the shader. */ 8537 /* See eevee_light_setup(). */ 8538 if (ld.l_type == AREA_RECT || ld.l_type == AREA_ELLIPSE) { 8539 power = (ld.l_sizex * ld.l_sizey * 4.0 * M_PI) * (1.0 / 80.0); 8540 if (ld.l_type == AREA_ELLIPSE) { 8541 power *= M_PI * 0.25; 8542 } 8543 power *= 20.0 * 8544 max(0.0, dot(-ld.l_forward, l_vector.xyz / l_vector.w)); /* XXX ad hoc, empirical */ 8545 } 8546 else if (ld.l_type == SUN) { 8547 power = ld.l_radius * ld.l_radius * M_PI; /* Removing area light power*/ 8548 power /= 1.0f + (ld.l_radius * ld.l_radius * 0.5f); 8549 power *= M_PI * 0.5; /* Matching cycles. */ 8550 } 8551 else { 8552 power = (4.0 * ld.l_radius * ld.l_radius) * (1.0 / 10.0); 8553 power *= M_2PI; /* Matching cycles with point light. */ 8554 } 8555 8556 power /= (l_vector.w * l_vector.w); 8557 8558 /* OPTI: find a better way than calculating this on the fly */ 8559 float lum = dot(ld.l_color, vec3(0.3, 0.6, 0.1)); /* luminance approx. */ 8560 vec3 tint = (lum > 0.0) ? ld.l_color / lum : vec3(1.0); /* normalize lum. to isolate hue+sat */ 8561 8562 lum = min(lum * power, volLightClamp); 8563 8564 return tint * lum; 8565 } 8566 8567 # define VOLUMETRIC_SHADOW_MAX_STEP 32.0 8568 8569 vec3 participating_media_extinction(vec3 wpos, sampler3D volume_extinction) 8570 { 8571 /* Waiting for proper volume shadowmaps and out of frustum shadow map. */ 8572 vec3 ndc = project_point(ViewProjectionMatrix, wpos); 8573 vec3 volume_co = ndc_to_volume(ndc * 0.5 + 0.5); 8574 8575 /* Let the texture be clamped to edge. This reduce visual glitches. */ 8576 return texture(volume_extinction, volume_co).rgb; 8577 } 8578 8579 vec3 light_volume_shadow(LightData ld, vec3 ray_wpos, vec4 l_vector, sampler3D volume_extinction) 8580 { 8581 # if defined(VOLUME_SHADOW) 8582 /* Heterogeneous volume shadows */ 8583 float dd = l_vector.w / volShadowSteps; 8584 vec3 L = l_vector.xyz * l_vector.w; 8585 vec3 shadow = vec3(1.0); 8586 for (float s = 0.5; s < VOLUMETRIC_SHADOW_MAX_STEP && s < (volShadowSteps - 0.1); s += 1.0) { 8587 vec3 pos = ray_wpos + L * (s / volShadowSteps); 8588 vec3 s_extinction = participating_media_extinction(pos, volume_extinction); 8589 shadow *= exp(-s_extinction * dd); 8590 } 8591 return shadow; 8592 # else 8593 return vec3(1.0); 8594 # endif /* VOLUME_SHADOW */ 8595 } 8596 #endif 8597 8598 #ifdef IRRADIANCE_LIB 8599 vec3 irradiance_volumetric(vec3 wpos) 8600 { 8601 # ifdef IRRADIANCE_HL2 8602 IrradianceData ir_data = load_irradiance_cell(0, vec3(1.0)); 8603 vec3 irradiance = ir_data.cubesides[0] + ir_data.cubesides[1] + ir_data.cubesides[2]; 8604 ir_data = load_irradiance_cell(0, vec3(-1.0)); 8605 irradiance += ir_data.cubesides[0] + ir_data.cubesides[1] + ir_data.cubesides[2]; 8606 irradiance *= 0.16666666; /* 1/6 */ 8607 return irradiance; 8608 # else 8609 return vec3(0.0); 8610 # endif 8611 } 8612 #endif 8613 8614 uniform sampler3D inScattering; 8615 uniform sampler3D inTransmittance; 8616 8617 vec4 volumetric_resolve(vec4 scene_color, vec2 frag_uvs, float frag_depth) 8618 { 8619 vec3 volume_cos = ndc_to_volume(vec3(frag_uvs, frag_depth)); 8620 8621 vec3 scattering = texture(inScattering, volume_cos).rgb; 8622 vec3 transmittance = texture(inTransmittance, volume_cos).rgb; 8623 8624 /* Approximate volume alpha by using a monochromatic transmitance 8625 * and adding it to the scene alpha. */ 8626 float final_alpha = mix(1.0, scene_color.a, dot(transmittance, vec3(1.0 / 3.0))); 8627 return vec4(scene_color.rgb * transmittance + scattering, final_alpha); 8628 } 8629 8630 uniform mat4 ModelViewMatrix; 8631 uniform mat4 ModelViewMatrixInverse; 8632 uniform mat3 NormalMatrix; 8633 uniform mat3 NormalMatrixInverse; 8634 8635 #ifndef USE_ATTR 8636 uniform mat4 ModelMatrix; 8637 uniform mat4 ModelMatrixInverse; 8638 #endif 8639 8640 /* Converters */ 8641 8642 float convert_rgba_to_float(vec4 color) 8643 { 8644 return dot(color.rgb, vec3(0.2126, 0.7152, 0.0722)); 8645 } 8646 8647 float exp_blender(float f) 8648 { 8649 return pow(2.71828182846, f); 8650 } 8651 8652 float compatible_pow(float x, float y) 8653 { 8654 if (y == 0.0) /* x^0 -> 1, including 0^0 */ 8655 return 1.0; 8656 8657 /* glsl pow doesn't accept negative x */ 8658 if (x < 0.0) { 8659 if (mod(-y, 2.0) == 0.0) 8660 return pow(-x, y); 8661 else 8662 return -pow(-x, y); 8663 } 8664 else if (x == 0.0) 8665 return 0.0; 8666 8667 return pow(x, y); 8668 } 8669 8670 void rgb_to_hsv(vec4 rgb, out vec4 outcol) 8671 { 8672 float cmax, cmin, h, s, v, cdelta; 8673 vec3 c; 8674 8675 cmax = max(rgb[0], max(rgb[1], rgb[2])); 8676 cmin = min(rgb[0], min(rgb[1], rgb[2])); 8677 cdelta = cmax - cmin; 8678 8679 v = cmax; 8680 if (cmax != 0.0) 8681 s = cdelta / cmax; 8682 else { 8683 s = 0.0; 8684 h = 0.0; 8685 } 8686 8687 if (s == 0.0) { 8688 h = 0.0; 8689 } 8690 else { 8691 c = (vec3(cmax) - rgb.xyz) / cdelta; 8692 8693 if (rgb.x == cmax) 8694 h = c[2] - c[1]; 8695 else if (rgb.y == cmax) 8696 h = 2.0 + c[0] - c[2]; 8697 else 8698 h = 4.0 + c[1] - c[0]; 8699 8700 h /= 6.0; 8701 8702 if (h < 0.0) 8703 h += 1.0; 8704 } 8705 8706 outcol = vec4(h, s, v, rgb.w); 8707 } 8708 8709 void hsv_to_rgb(vec4 hsv, out vec4 outcol) 8710 { 8711 float i, f, p, q, t, h, s, v; 8712 vec3 rgb; 8713 8714 h = hsv[0]; 8715 s = hsv[1]; 8716 v = hsv[2]; 8717 8718 if (s == 0.0) { 8719 rgb = vec3(v, v, v); 8720 } 8721 else { 8722 if (h == 1.0) 8723 h = 0.0; 8724 8725 h *= 6.0; 8726 i = floor(h); 8727 f = h - i; 8728 rgb = vec3(f, f, f); 8729 p = v * (1.0 - s); 8730 q = v * (1.0 - (s * f)); 8731 t = v * (1.0 - (s * (1.0 - f))); 8732 8733 if (i == 0.0) 8734 rgb = vec3(v, t, p); 8735 else if (i == 1.0) 8736 rgb = vec3(q, v, p); 8737 else if (i == 2.0) 8738 rgb = vec3(p, v, t); 8739 else if (i == 3.0) 8740 rgb = vec3(p, q, v); 8741 else if (i == 4.0) 8742 rgb = vec3(t, p, v); 8743 else 8744 rgb = vec3(v, p, q); 8745 } 8746 8747 outcol = vec4(rgb, hsv.w); 8748 } 8749 8750 float srgb_to_linearrgb(float c) 8751 { 8752 if (c < 0.04045) 8753 return (c < 0.0) ? 0.0 : c * (1.0 / 12.92); 8754 else 8755 return pow((c + 0.055) * (1.0 / 1.055), 2.4); 8756 } 8757 8758 float linearrgb_to_srgb(float c) 8759 { 8760 if (c < 0.0031308) 8761 return (c < 0.0) ? 0.0 : c * 12.92; 8762 else 8763 return 1.055 * pow(c, 1.0 / 2.4) - 0.055; 8764 } 8765 8766 void srgb_to_linearrgb(vec4 col_from, out vec4 col_to) 8767 { 8768 col_to.r = srgb_to_linearrgb(col_from.r); 8769 col_to.g = srgb_to_linearrgb(col_from.g); 8770 col_to.b = srgb_to_linearrgb(col_from.b); 8771 col_to.a = col_from.a; 8772 } 8773 8774 void linearrgb_to_srgb(vec4 col_from, out vec4 col_to) 8775 { 8776 col_to.r = linearrgb_to_srgb(col_from.r); 8777 col_to.g = linearrgb_to_srgb(col_from.g); 8778 col_to.b = linearrgb_to_srgb(col_from.b); 8779 col_to.a = col_from.a; 8780 } 8781 8782 void color_to_normal_new_shading(vec3 color, out vec3 normal) 8783 { 8784 normal = vec3(2.0) * color - vec3(1.0); 8785 } 8786 8787 void color_to_blender_normal_new_shading(vec3 color, out vec3 normal) 8788 { 8789 normal = vec3(2.0, -2.0, -2.0) * color - vec3(1.0); 8790 } 8791 8792 #ifndef M_PI 8793 # define M_PI 3.14159265358979323846 8794 #endif 8795 #ifndef M_1_PI 8796 # define M_1_PI 0.318309886183790671538 8797 #endif 8798 8799 /*********** SHADER NODES ***************/ 8800 8801 void particle_info(vec4 sprops, 8802 vec4 loc, 8803 vec3 vel, 8804 vec3 avel, 8805 out float index, 8806 out float random, 8807 out float age, 8808 out float life_time, 8809 out vec3 location, 8810 out float size, 8811 out vec3 velocity, 8812 out vec3 angular_velocity) 8813 { 8814 index = sprops.x; 8815 random = loc.w; 8816 age = sprops.y; 8817 life_time = sprops.z; 8818 size = sprops.w; 8819 8820 location = loc.xyz; 8821 velocity = vel; 8822 angular_velocity = avel; 8823 } 8824 8825 void vect_normalize(vec3 vin, out vec3 vout) 8826 { 8827 vout = normalize(vin); 8828 } 8829 8830 void direction_transform_m4v3(vec3 vin, mat4 mat, out vec3 vout) 8831 { 8832 vout = (mat * vec4(vin, 0.0)).xyz; 8833 } 8834 8835 void mat3_mul(vec3 vin, mat3 mat, out vec3 vout) 8836 { 8837 vout = mat * vin; 8838 } 8839 8840 void point_transform_m4v3(vec3 vin, mat4 mat, out vec3 vout) 8841 { 8842 vout = (mat * vec4(vin, 1.0)).xyz; 8843 } 8844 8845 void point_texco_remap_square(vec3 vin, out vec3 vout) 8846 { 8847 vout = vin * 2.0 - 1.0; 8848 } 8849 8850 void point_texco_clamp(vec3 vin, sampler2D ima, out vec3 vout) 8851 { 8852 vec2 half_texel_size = 0.5 / vec2(textureSize(ima, 0).xy); 8853 vout = clamp(vin, half_texel_size.xyy, 1.0 - half_texel_size.xyy); 8854 } 8855 8856 void point_map_to_sphere(vec3 vin, out vec3 vout) 8857 { 8858 float len = length(vin); 8859 float v, u; 8860 if (len > 0.0) { 8861 if (vin.x == 0.0 && vin.y == 0.0) 8862 u = 0.0; 8863 else 8864 u = (1.0 - atan(vin.x, vin.y) / M_PI) / 2.0; 8865 8866 v = 1.0 - acos(vin.z / len) / M_PI; 8867 } 8868 else 8869 v = u = 0.0; 8870 8871 vout = vec3(u, v, 0.0); 8872 } 8873 8874 void point_map_to_tube(vec3 vin, out vec3 vout) 8875 { 8876 float u, v; 8877 v = (vin.z + 1.0) * 0.5; 8878 float len = sqrt(vin.x * vin.x + vin.y * vin[1]); 8879 if (len > 0.0) 8880 u = (1.0 - (atan(vin.x / len, vin.y / len) / M_PI)) * 0.5; 8881 else 8882 v = u = 0.0; 8883 8884 vout = vec3(u, v, 0.0); 8885 } 8886 8887 void mapping( 8888 vec3 vec, vec4 m0, vec4 m1, vec4 m2, vec4 m3, vec3 minvec, vec3 maxvec, out vec3 outvec) 8889 { 8890 mat4 mat = mat4(m0, m1, m2, m3); 8891 outvec = (mat * vec4(vec, 1.0)).xyz; 8892 outvec = clamp(outvec, minvec, maxvec); 8893 } 8894 8895 void camera(vec3 co, out vec3 outview, out float outdepth, out float outdist) 8896 { 8897 outdepth = abs(co.z); 8898 outdist = length(co); 8899 outview = normalize(co); 8900 } 8901 8902 void math_add(float val1, float val2, out float outval) 8903 { 8904 outval = val1 + val2; 8905 } 8906 8907 void math_subtract(float val1, float val2, out float outval) 8908 { 8909 outval = val1 - val2; 8910 } 8911 8912 void math_multiply(float val1, float val2, out float outval) 8913 { 8914 outval = val1 * val2; 8915 } 8916 8917 void math_divide(float val1, float val2, out float outval) 8918 { 8919 if (val2 == 0.0) 8920 outval = 0.0; 8921 else 8922 outval = val1 / val2; 8923 } 8924 8925 void math_sine(float val, out float outval) 8926 { 8927 outval = sin(val); 8928 } 8929 8930 void math_cosine(float val, out float outval) 8931 { 8932 outval = cos(val); 8933 } 8934 8935 void math_tangent(float val, out float outval) 8936 { 8937 outval = tan(val); 8938 } 8939 8940 void math_asin(float val, out float outval) 8941 { 8942 if (val <= 1.0 && val >= -1.0) 8943 outval = asin(val); 8944 else 8945 outval = 0.0; 8946 } 8947 8948 void math_acos(float val, out float outval) 8949 { 8950 if (val <= 1.0 && val >= -1.0) 8951 outval = acos(val); 8952 else 8953 outval = 0.0; 8954 } 8955 8956 void math_atan(float val, out float outval) 8957 { 8958 outval = atan(val); 8959 } 8960 8961 void math_pow(float val1, float val2, out float outval) 8962 { 8963 if (val1 >= 0.0) { 8964 outval = compatible_pow(val1, val2); 8965 } 8966 else { 8967 float val2_mod_1 = mod(abs(val2), 1.0); 8968 8969 if (val2_mod_1 > 0.999 || val2_mod_1 < 0.001) 8970 outval = compatible_pow(val1, floor(val2 + 0.5)); 8971 else 8972 outval = 0.0; 8973 } 8974 } 8975 8976 void math_log(float val1, float val2, out float outval) 8977 { 8978 if (val1 > 0.0 && val2 > 0.0) 8979 outval = log2(val1) / log2(val2); 8980 else 8981 outval = 0.0; 8982 } 8983 8984 void math_max(float val1, float val2, out float outval) 8985 { 8986 outval = max(val1, val2); 8987 } 8988 8989 void math_min(float val1, float val2, out float outval) 8990 { 8991 outval = min(val1, val2); 8992 } 8993 8994 void math_round(float val, out float outval) 8995 { 8996 outval = floor(val + 0.5); 8997 } 8998 8999 void math_less_than(float val1, float val2, out float outval) 9000 { 9001 if (val1 < val2) 9002 outval = 1.0; 9003 else 9004 outval = 0.0; 9005 } 9006 9007 void math_greater_than(float val1, float val2, out float outval) 9008 { 9009 if (val1 > val2) 9010 outval = 1.0; 9011 else 9012 outval = 0.0; 9013 } 9014 9015 void math_modulo(float val1, float val2, out float outval) 9016 { 9017 if (val2 == 0.0) 9018 outval = 0.0; 9019 else 9020 outval = mod(val1, val2); 9021 9022 /* change sign to match C convention, mod in GLSL will take absolute for negative numbers, 9023 * see https://www.opengl.org/sdk/docs/man/html/mod.xhtml */ 9024 outval = (val1 > 0.0) ? outval : outval - val2; 9025 } 9026 9027 void math_abs(float val1, out float outval) 9028 { 9029 outval = abs(val1); 9030 } 9031 9032 void math_atan2(float val1, float val2, out float outval) 9033 { 9034 outval = atan(val1, val2); 9035 } 9036 9037 void math_floor(float val, out float outval) 9038 { 9039 outval = floor(val); 9040 } 9041 9042 void math_ceil(float val, out float outval) 9043 { 9044 outval = ceil(val); 9045 } 9046 9047 void math_fract(float val, out float outval) 9048 { 9049 outval = val - floor(val); 9050 } 9051 9052 void math_sqrt(float val, out float outval) 9053 { 9054 if (val > 0.0) 9055 outval = sqrt(val); 9056 else 9057 outval = 0.0; 9058 } 9059 9060 void squeeze(float val, float width, float center, out float outval) 9061 { 9062 outval = 1.0 / (1.0 + pow(2.71828183, -((val - center) * width))); 9063 } 9064 9065 void vec_math_add(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9066 { 9067 outvec = v1 + v2; 9068 outval = (abs(outvec[0]) + abs(outvec[1]) + abs(outvec[2])) * 0.333333; 9069 } 9070 9071 void vec_math_sub(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9072 { 9073 outvec = v1 - v2; 9074 outval = (abs(outvec[0]) + abs(outvec[1]) + abs(outvec[2])) * 0.333333; 9075 } 9076 9077 void vec_math_average(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9078 { 9079 outvec = v1 + v2; 9080 outval = length(outvec); 9081 outvec = normalize(outvec); 9082 } 9083 void vec_math_mix(float strength, vec3 v1, vec3 v2, out vec3 outvec) 9084 { 9085 outvec = strength * v1 + (1 - strength) * v2; 9086 } 9087 9088 void vec_math_dot(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9089 { 9090 outvec = vec3(0); 9091 outval = dot(v1, v2); 9092 } 9093 9094 void vec_math_cross(vec3 v1, vec3 v2, out vec3 outvec, out float outval) 9095 { 9096 outvec = cross(v1, v2); 9097 outval = length(outvec); 9098 outvec /= outval; 9099 } 9100 9101 void vec_math_normalize(vec3 v, out vec3 outvec, out float outval) 9102 { 9103 outval = length(v); 9104 outvec = normalize(v); 9105 } 9106 9107 void vec_math_negate(vec3 v, out vec3 outv) 9108 { 9109 outv = -v; 9110 } 9111 9112 void invert_z(vec3 v, out vec3 outv) 9113 { 9114 v.z = -v.z; 9115 outv = v; 9116 } 9117 9118 void normal_new_shading(vec3 nor, vec3 dir, out vec3 outnor, out float outdot) 9119 { 9120 outnor = dir; 9121 outdot = dot(normalize(nor), dir); 9122 } 9123 9124 void curves_vec(float fac, vec3 vec, sampler1DArray curvemap, float layer, out vec3 outvec) 9125 { 9126 vec4 co = vec4(vec * 0.5 + 0.5, layer); 9127 outvec.x = texture(curvemap, co.xw).x; 9128 outvec.y = texture(curvemap, co.yw).y; 9129 outvec.z = texture(curvemap, co.zw).z; 9130 outvec = mix(vec, outvec, fac); 9131 } 9132 9133 /* ext is vec4(in_x, in_dy, out_x, out_dy). */ 9134 float curve_extrapolate(float x, float y, vec4 ext) 9135 { 9136 if (x < 0.0) { 9137 return y + x * ext.y; 9138 } 9139 else if (x > 1.0) { 9140 return y + (x - 1.0) * ext.w; 9141 } 9142 else { 9143 return y; 9144 } 9145 } 9146 9147 #define RANGE_RESCALE(x, min, range) ((x - min) * range) 9148 9149 void curves_rgb(float fac, 9150 vec4 col, 9151 sampler1DArray curvemap, 9152 float layer, 9153 vec4 range, 9154 vec4 ext_r, 9155 vec4 ext_g, 9156 vec4 ext_b, 9157 vec4 ext_a, 9158 out vec4 outcol) 9159 { 9160 vec4 co = vec4(RANGE_RESCALE(col.rgb, ext_a.x, range.a), layer); 9161 vec3 samp; 9162 samp.r = texture(curvemap, co.xw).a; 9163 samp.g = texture(curvemap, co.yw).a; 9164 samp.b = texture(curvemap, co.zw).a; 9165 9166 samp.r = curve_extrapolate(co.x, samp.r, ext_a); 9167 samp.g = curve_extrapolate(co.y, samp.g, ext_a); 9168 samp.b = curve_extrapolate(co.z, samp.b, ext_a); 9169 9170 vec3 rgb_min = vec3(ext_r.x, ext_g.x, ext_b.x); 9171 co.xyz = RANGE_RESCALE(samp.rgb, rgb_min, range.rgb); 9172 9173 samp.r = texture(curvemap, co.xw).r; 9174 samp.g = texture(curvemap, co.yw).g; 9175 samp.b = texture(curvemap, co.zw).b; 9176 9177 outcol.r = curve_extrapolate(co.x, samp.r, ext_r); 9178 outcol.g = curve_extrapolate(co.y, samp.g, ext_g); 9179 outcol.b = curve_extrapolate(co.z, samp.b, ext_b); 9180 outcol.a = col.a; 9181 9182 outcol = mix(col, outcol, fac); 9183 } 9184 9185 void curves_rgb_opti(float fac, 9186 vec4 col, 9187 sampler1DArray curvemap, 9188 float layer, 9189 vec4 range, 9190 vec4 ext_a, 9191 out vec4 outcol) 9192 { 9193 vec4 co = vec4(RANGE_RESCALE(col.rgb, ext_a.x, range.a), layer); 9194 vec3 samp; 9195 samp.r = texture(curvemap, co.xw).a; 9196 samp.g = texture(curvemap, co.yw).a; 9197 samp.b = texture(curvemap, co.zw).a; 9198 9199 outcol.r = curve_extrapolate(co.x, samp.r, ext_a); 9200 outcol.g = curve_extrapolate(co.y, samp.g, ext_a); 9201 outcol.b = curve_extrapolate(co.z, samp.b, ext_a); 9202 outcol.a = col.a; 9203 9204 outcol = mix(col, outcol, fac); 9205 } 9206 9207 void set_value(float val, out float outval) 9208 { 9209 outval = val; 9210 } 9211 9212 void set_rgb(vec3 col, out vec3 outcol) 9213 { 9214 outcol = col; 9215 } 9216 9217 void set_rgba(vec4 col, out vec4 outcol) 9218 { 9219 outcol = col; 9220 } 9221 9222 void set_value_zero(out float outval) 9223 { 9224 outval = 0.0; 9225 } 9226 9227 void set_value_one(out float outval) 9228 { 9229 outval = 1.0; 9230 } 9231 9232 void set_rgb_zero(out vec3 outval) 9233 { 9234 outval = vec3(0.0); 9235 } 9236 9237 void set_rgb_one(out vec3 outval) 9238 { 9239 outval = vec3(1.0); 9240 } 9241 9242 void set_rgba_zero(out vec4 outval) 9243 { 9244 outval = vec4(0.0); 9245 } 9246 9247 void set_rgba_one(out vec4 outval) 9248 { 9249 outval = vec4(1.0); 9250 } 9251 9252 void brightness_contrast(vec4 col, float brightness, float contrast, out vec4 outcol) 9253 { 9254 float a = 1.0 + contrast; 9255 float b = brightness - contrast * 0.5; 9256 9257 outcol.r = max(a * col.r + b, 0.0); 9258 outcol.g = max(a * col.g + b, 0.0); 9259 outcol.b = max(a * col.b + b, 0.0); 9260 outcol.a = col.a; 9261 } 9262 9263 void mix_blend(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9264 { 9265 fac = clamp(fac, 0.0, 1.0); 9266 outcol = mix(col1, col2, fac); 9267 outcol.a = col1.a; 9268 } 9269 9270 void mix_add(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9271 { 9272 fac = clamp(fac, 0.0, 1.0); 9273 outcol = mix(col1, col1 + col2, fac); 9274 outcol.a = col1.a; 9275 } 9276 9277 void mix_mult(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9278 { 9279 fac = clamp(fac, 0.0, 1.0); 9280 outcol = mix(col1, col1 * col2, fac); 9281 outcol.a = col1.a; 9282 } 9283 9284 void mix_screen(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9285 { 9286 fac = clamp(fac, 0.0, 1.0); 9287 float facm = 1.0 - fac; 9288 9289 outcol = vec4(1.0) - (vec4(facm) + fac * (vec4(1.0) - col2)) * (vec4(1.0) - col1); 9290 outcol.a = col1.a; 9291 } 9292 9293 void mix_overlay(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9294 { 9295 fac = clamp(fac, 0.0, 1.0); 9296 float facm = 1.0 - fac; 9297 9298 outcol = col1; 9299 9300 if (outcol.r < 0.5) 9301 outcol.r *= facm + 2.0 * fac * col2.r; 9302 else 9303 outcol.r = 1.0 - (facm + 2.0 * fac * (1.0 - col2.r)) * (1.0 - outcol.r); 9304 9305 if (outcol.g < 0.5) 9306 outcol.g *= facm + 2.0 * fac * col2.g; 9307 else 9308 outcol.g = 1.0 - (facm + 2.0 * fac * (1.0 - col2.g)) * (1.0 - outcol.g); 9309 9310 if (outcol.b < 0.5) 9311 outcol.b *= facm + 2.0 * fac * col2.b; 9312 else 9313 outcol.b = 1.0 - (facm + 2.0 * fac * (1.0 - col2.b)) * (1.0 - outcol.b); 9314 } 9315 9316 void mix_sub(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9317 { 9318 fac = clamp(fac, 0.0, 1.0); 9319 outcol = mix(col1, col1 - col2, fac); 9320 outcol.a = col1.a; 9321 } 9322 9323 void mix_div(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9324 { 9325 fac = clamp(fac, 0.0, 1.0); 9326 float facm = 1.0 - fac; 9327 9328 outcol = col1; 9329 9330 if (col2.r != 0.0) 9331 outcol.r = facm * outcol.r + fac * outcol.r / col2.r; 9332 if (col2.g != 0.0) 9333 outcol.g = facm * outcol.g + fac * outcol.g / col2.g; 9334 if (col2.b != 0.0) 9335 outcol.b = facm * outcol.b + fac * outcol.b / col2.b; 9336 } 9337 9338 void mix_diff(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9339 { 9340 fac = clamp(fac, 0.0, 1.0); 9341 outcol = mix(col1, abs(col1 - col2), fac); 9342 outcol.a = col1.a; 9343 } 9344 9345 void mix_dark(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9346 { 9347 fac = clamp(fac, 0.0, 1.0); 9348 outcol.rgb = min(col1.rgb, col2.rgb * fac); 9349 outcol.a = col1.a; 9350 } 9351 9352 void mix_light(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9353 { 9354 fac = clamp(fac, 0.0, 1.0); 9355 outcol.rgb = max(col1.rgb, col2.rgb * fac); 9356 outcol.a = col1.a; 9357 } 9358 9359 void mix_dodge(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9360 { 9361 fac = clamp(fac, 0.0, 1.0); 9362 outcol = col1; 9363 9364 if (outcol.r != 0.0) { 9365 float tmp = 1.0 - fac * col2.r; 9366 if (tmp <= 0.0) 9367 outcol.r = 1.0; 9368 else if ((tmp = outcol.r / tmp) > 1.0) 9369 outcol.r = 1.0; 9370 else 9371 outcol.r = tmp; 9372 } 9373 if (outcol.g != 0.0) { 9374 float tmp = 1.0 - fac * col2.g; 9375 if (tmp <= 0.0) 9376 outcol.g = 1.0; 9377 else if ((tmp = outcol.g / tmp) > 1.0) 9378 outcol.g = 1.0; 9379 else 9380 outcol.g = tmp; 9381 } 9382 if (outcol.b != 0.0) { 9383 float tmp = 1.0 - fac * col2.b; 9384 if (tmp <= 0.0) 9385 outcol.b = 1.0; 9386 else if ((tmp = outcol.b / tmp) > 1.0) 9387 outcol.b = 1.0; 9388 else 9389 outcol.b = tmp; 9390 } 9391 } 9392 9393 void mix_burn(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9394 { 9395 fac = clamp(fac, 0.0, 1.0); 9396 float tmp, facm = 1.0 - fac; 9397 9398 outcol = col1; 9399 9400 tmp = facm + fac * col2.r; 9401 if (tmp <= 0.0) 9402 outcol.r = 0.0; 9403 else if ((tmp = (1.0 - (1.0 - outcol.r) / tmp)) < 0.0) 9404 outcol.r = 0.0; 9405 else if (tmp > 1.0) 9406 outcol.r = 1.0; 9407 else 9408 outcol.r = tmp; 9409 9410 tmp = facm + fac * col2.g; 9411 if (tmp <= 0.0) 9412 outcol.g = 0.0; 9413 else if ((tmp = (1.0 - (1.0 - outcol.g) / tmp)) < 0.0) 9414 outcol.g = 0.0; 9415 else if (tmp > 1.0) 9416 outcol.g = 1.0; 9417 else 9418 outcol.g = tmp; 9419 9420 tmp = facm + fac * col2.b; 9421 if (tmp <= 0.0) 9422 outcol.b = 0.0; 9423 else if ((tmp = (1.0 - (1.0 - outcol.b) / tmp)) < 0.0) 9424 outcol.b = 0.0; 9425 else if (tmp > 1.0) 9426 outcol.b = 1.0; 9427 else 9428 outcol.b = tmp; 9429 } 9430 9431 void mix_hue(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9432 { 9433 fac = clamp(fac, 0.0, 1.0); 9434 float facm = 1.0 - fac; 9435 9436 outcol = col1; 9437 9438 vec4 hsv, hsv2, tmp; 9439 rgb_to_hsv(col2, hsv2); 9440 9441 if (hsv2.y != 0.0) { 9442 rgb_to_hsv(outcol, hsv); 9443 hsv.x = hsv2.x; 9444 hsv_to_rgb(hsv, tmp); 9445 9446 outcol = mix(outcol, tmp, fac); 9447 outcol.a = col1.a; 9448 } 9449 } 9450 9451 void mix_sat(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9452 { 9453 fac = clamp(fac, 0.0, 1.0); 9454 float facm = 1.0 - fac; 9455 9456 outcol = col1; 9457 9458 vec4 hsv, hsv2; 9459 rgb_to_hsv(outcol, hsv); 9460 9461 if (hsv.y != 0.0) { 9462 rgb_to_hsv(col2, hsv2); 9463 9464 hsv.y = facm * hsv.y + fac * hsv2.y; 9465 hsv_to_rgb(hsv, outcol); 9466 } 9467 } 9468 9469 void mix_val(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9470 { 9471 fac = clamp(fac, 0.0, 1.0); 9472 float facm = 1.0 - fac; 9473 9474 vec4 hsv, hsv2; 9475 rgb_to_hsv(col1, hsv); 9476 rgb_to_hsv(col2, hsv2); 9477 9478 hsv.z = facm * hsv.z + fac * hsv2.z; 9479 hsv_to_rgb(hsv, outcol); 9480 } 9481 9482 void mix_color(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9483 { 9484 fac = clamp(fac, 0.0, 1.0); 9485 float facm = 1.0 - fac; 9486 9487 outcol = col1; 9488 9489 vec4 hsv, hsv2, tmp; 9490 rgb_to_hsv(col2, hsv2); 9491 9492 if (hsv2.y != 0.0) { 9493 rgb_to_hsv(outcol, hsv); 9494 hsv.x = hsv2.x; 9495 hsv.y = hsv2.y; 9496 hsv_to_rgb(hsv, tmp); 9497 9498 outcol = mix(outcol, tmp, fac); 9499 outcol.a = col1.a; 9500 } 9501 } 9502 9503 void mix_soft(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9504 { 9505 fac = clamp(fac, 0.0, 1.0); 9506 float facm = 1.0 - fac; 9507 9508 vec4 one = vec4(1.0); 9509 vec4 scr = one - (one - col2) * (one - col1); 9510 outcol = facm * col1 + fac * ((one - col1) * col2 * col1 + col1 * scr); 9511 } 9512 9513 void mix_linear(float fac, vec4 col1, vec4 col2, out vec4 outcol) 9514 { 9515 fac = clamp(fac, 0.0, 1.0); 9516 9517 outcol = col1 + fac * (2.0 * (col2 - vec4(0.5))); 9518 } 9519 9520 void valtorgb_opti_constant( 9521 float fac, float edge, vec4 color1, vec4 color2, out vec4 outcol, out float outalpha) 9522 { 9523 outcol = (fac > edge) ? color2 : color1; 9524 outalpha = outcol.a; 9525 } 9526 9527 void valtorgb_opti_linear( 9528 float fac, vec2 mulbias, vec4 color1, vec4 color2, out vec4 outcol, out float outalpha) 9529 { 9530 fac = clamp(fac * mulbias.x + mulbias.y, 0.0, 1.0); 9531 outcol = mix(color1, color2, fac); 9532 outalpha = outcol.a; 9533 } 9534 9535 void valtorgb(float fac, sampler1DArray colormap, float layer, out vec4 outcol, out float outalpha) 9536 { 9537 outcol = texture(colormap, vec2(fac, layer)); 9538 outalpha = outcol.a; 9539 } 9540 9541 void valtorgb_nearest( 9542 float fac, sampler1DArray colormap, float layer, out vec4 outcol, out float outalpha) 9543 { 9544 fac = clamp(fac, 0.0, 1.0); 9545 outcol = texelFetch(colormap, ivec2(fac * (textureSize(colormap, 0).x - 1), layer), 0); 9546 outalpha = outcol.a; 9547 } 9548 9549 void rgbtobw(vec4 color, out float outval) 9550 { 9551 vec3 factors = vec3(0.2126, 0.7152, 0.0722); 9552 outval = dot(color.rgb, factors); 9553 } 9554 9555 void invert(float fac, vec4 col, out vec4 outcol) 9556 { 9557 outcol.xyz = mix(col.xyz, vec3(1.0) - col.xyz, fac); 9558 outcol.w = col.w; 9559 } 9560 9561 void clamp_vec3(vec3 vec, vec3 min, vec3 max, out vec3 out_vec) 9562 { 9563 out_vec = clamp(vec, min, max); 9564 } 9565 9566 void clamp_val(float value, float min, float max, out float out_value) 9567 { 9568 out_value = clamp(value, min, max); 9569 } 9570 9571 void hue_sat(float hue, float sat, float value, float fac, vec4 col, out vec4 outcol) 9572 { 9573 vec4 hsv; 9574 9575 rgb_to_hsv(col, hsv); 9576 9577 hsv[0] = fract(hsv[0] + hue + 0.5); 9578 hsv[1] = clamp(hsv[1] * sat, 0.0, 1.0); 9579 hsv[2] = hsv[2] * value; 9580 9581 hsv_to_rgb(hsv, outcol); 9582 9583 outcol = mix(col, outcol, fac); 9584 } 9585 9586 void separate_rgb(vec4 col, out float r, out float g, out float b) 9587 { 9588 r = col.r; 9589 g = col.g; 9590 b = col.b; 9591 } 9592 9593 void combine_rgb(float r, float g, float b, out vec4 col) 9594 { 9595 col = vec4(r, g, b, 1.0); 9596 } 9597 9598 void separate_xyz(vec3 vec, out float x, out float y, out float z) 9599 { 9600 x = vec.r; 9601 y = vec.g; 9602 z = vec.b; 9603 } 9604 9605 void combine_xyz(float x, float y, float z, out vec3 vec) 9606 { 9607 vec = vec3(x, y, z); 9608 } 9609 9610 void separate_hsv(vec4 col, out float h, out float s, out float v) 9611 { 9612 vec4 hsv; 9613 9614 rgb_to_hsv(col, hsv); 9615 h = hsv[0]; 9616 s = hsv[1]; 9617 v = hsv[2]; 9618 } 9619 9620 void combine_hsv(float h, float s, float v, out vec4 col) 9621 { 9622 hsv_to_rgb(vec4(h, s, v, 1.0), col); 9623 } 9624 9625 void output_node(vec4 rgb, float alpha, out vec4 outrgb) 9626 { 9627 outrgb = vec4(rgb.rgb, alpha); 9628 } 9629 9630 /*********** TEXTURES ***************/ 9631 9632 void texco_norm(vec3 normal, out vec3 outnormal) 9633 { 9634 /* corresponds to shi->orn, which is negated so cancels 9635 out blender normal negation */ 9636 outnormal = normalize(normal); 9637 } 9638 9639 vec3 mtex_2d_mapping(vec3 vec) 9640 { 9641 return vec3(vec.xy * 0.5 + vec2(0.5), vec.z); 9642 } 9643 9644 /** helper method to extract the upper left 3x3 matrix from a 4x4 matrix */ 9645 mat3 to_mat3(mat4 m4) 9646 { 9647 mat3 m3; 9648 m3[0] = m4[0].xyz; 9649 m3[1] = m4[1].xyz; 9650 m3[2] = m4[2].xyz; 9651 return m3; 9652 } 9653 9654 /*********** NEW SHADER UTILITIES **************/ 9655 9656 float fresnel_dielectric_0(float eta) 9657 { 9658 /* compute fresnel reflactance at normal incidence => cosi = 1.0 */ 9659 float A = (eta - 1.0) / (eta + 1.0); 9660 9661 return A * A; 9662 } 9663 9664 float fresnel_dielectric_cos(float cosi, float eta) 9665 { 9666 /* compute fresnel reflectance without explicitly computing 9667 * the refracted direction */ 9668 float c = abs(cosi); 9669 float g = eta * eta - 1.0 + c * c; 9670 float result; 9671 9672 if (g > 0.0) { 9673 g = sqrt(g); 9674 float A = (g - c) / (g + c); 9675 float B = (c * (g + c) - 1.0) / (c * (g - c) + 1.0); 9676 result = 0.5 * A * A * (1.0 + B * B); 9677 } 9678 else { 9679 result = 1.0; /* TIR (no refracted component) */ 9680 } 9681 9682 return result; 9683 } 9684 9685 float fresnel_dielectric(vec3 Incoming, vec3 Normal, float eta) 9686 { 9687 /* compute fresnel reflectance without explicitly computing 9688 * the refracted direction */ 9689 return fresnel_dielectric_cos(dot(Incoming, Normal), eta); 9690 } 9691 9692 float hypot(float x, float y) 9693 { 9694 return sqrt(x * x + y * y); 9695 } 9696 9697 void generated_from_orco(vec3 orco, out vec3 generated) 9698 { 9699 #ifdef VOLUMETRICS 9700 # ifdef MESH_SHADER 9701 generated = volumeObjectLocalCoord; 9702 # else 9703 generated = worldPosition; 9704 # endif 9705 #else 9706 generated = orco; 9707 #endif 9708 } 9709 9710 int floor_to_int(float x) 9711 { 9712 return int(floor(x)); 9713 } 9714 9715 int quick_floor(float x) 9716 { 9717 return int(x) - ((x < 0) ? 1 : 0); 9718 } 9719 9720 float integer_noise(int n) 9721 { 9722 int nn; 9723 n = (n + 1013) & 0x7fffffff; 9724 n = (n >> 13) ^ n; 9725 nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff; 9726 return 0.5 * (float(nn) / 1073741824.0); 9727 } 9728 9729 uint hash(uint kx, uint ky, uint kz) 9730 { 9731 #define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k)))) 9732 #define final(a, b, c) \ 9733 { \ 9734 c ^= b; \ 9735 c -= rot(b, 14); \ 9736 a ^= c; \ 9737 a -= rot(c, 11); \ 9738 b ^= a; \ 9739 b -= rot(a, 25); \ 9740 c ^= b; \ 9741 c -= rot(b, 16); \ 9742 a ^= c; \ 9743 a -= rot(c, 4); \ 9744 b ^= a; \ 9745 b -= rot(a, 14); \ 9746 c ^= b; \ 9747 c -= rot(b, 24); \ 9748 } 9749 // now hash the data! 9750 uint a, b, c, len = 3u; 9751 a = b = c = 0xdeadbeefu + (len << 2u) + 13u; 9752 9753 c += kz; 9754 b += ky; 9755 a += kx; 9756 final(a, b, c); 9757 9758 return c; 9759 #undef rot 9760 #undef final 9761 } 9762 9763 uint hash(int kx, int ky, int kz) 9764 { 9765 return hash(uint(kx), uint(ky), uint(kz)); 9766 } 9767 9768 float bits_to_01(uint bits) 9769 { 9770 return (float(bits) / 4294967295.0); 9771 } 9772 9773 float cellnoise(vec3 p) 9774 { 9775 int ix = quick_floor(p.x); 9776 int iy = quick_floor(p.y); 9777 int iz = quick_floor(p.z); 9778 9779 return bits_to_01(hash(uint(ix), uint(iy), uint(iz))); 9780 } 9781 9782 vec3 cellnoise_color(vec3 p) 9783 { 9784 float r = cellnoise(p.xyz); 9785 float g = cellnoise(p.yxz); 9786 float b = cellnoise(p.yzx); 9787 9788 return vec3(r, g, b); 9789 } 9790 9791 float floorfrac(float x, out int i) 9792 { 9793 i = floor_to_int(x); 9794 return x - i; 9795 } 9796 9797 /* bsdfs */ 9798 9799 vec3 tint_from_color(vec3 color) 9800 { 9801 float lum = dot(color, vec3(0.3, 0.6, 0.1)); /* luminance approx. */ 9802 return (lum > 0) ? color / lum : vec3(1.0); /* normalize lum. to isolate hue+sat */ 9803 } 9804 9805 void convert_metallic_to_specular_tinted(vec3 basecol, 9806 vec3 basecol_tint, 9807 float metallic, 9808 float specular_fac, 9809 float specular_tint, 9810 out vec3 diffuse, 9811 out vec3 f0) 9812 { 9813 vec3 tmp_col = mix(vec3(1.0), basecol_tint, specular_tint); 9814 f0 = mix((0.08 * specular_fac) * tmp_col, basecol, metallic); 9815 diffuse = basecol * (1.0 - metallic); 9816 } 9817 9818 vec3 principled_sheen(float NV, vec3 basecol_tint, float sheen_tint) 9819 { 9820 float f = 1.0 - NV; 9821 /* Temporary fix for T59784. Normal map seems to contain NaNs for tangent space normal maps, therefore we need to clamp value. */ 9822 f = clamp(f, 0.0, 1.0); 9823 /* Empirical approximation (manual curve fitting). Can be refined. */ 9824 float sheen = f * f * f * 0.077 + f * 0.01 + 0.00026; 9825 return sheen * mix(vec3(1.0), basecol_tint, sheen_tint); 9826 } 9827 9828 #ifndef VOLUMETRICS 9829 void node_bsdf_diffuse(vec4 color, float roughness, vec3 N, out Closure result) 9830 { 9831 N = normalize(N); 9832 vec3 vN = mat3(ViewMatrix) * N; 9833 result = CLOSURE_DEFAULT; 9834 result.ssr_normal = normal_encode(vN, viewCameraVec); 9835 eevee_closure_diffuse(N, color.rgb, 1.0, result.radiance); 9836 result.radiance *= color.rgb; 9837 } 9838 9839 void node_bsdf_glossy(vec4 color, float roughness, vec3 N, float ssr_id, out Closure result) 9840 { 9841 N = normalize(N); 9842 vec3 out_spec, ssr_spec; 9843 eevee_closure_glossy(N, vec3(1.0), int(ssr_id), roughness, 1.0, out_spec, ssr_spec); 9844 vec3 vN = mat3(ViewMatrix) * N; 9845 result = CLOSURE_DEFAULT; 9846 result.radiance = out_spec * color.rgb; 9847 result.ssr_data = vec4(ssr_spec * color.rgb, roughness); 9848 result.ssr_normal = normal_encode(vN, viewCameraVec); 9849 result.ssr_id = int(ssr_id); 9850 } 9851 9852 void node_bsdf_anisotropic(vec4 color, 9853 float roughness, 9854 float anisotropy, 9855 float rotation, 9856 vec3 N, 9857 vec3 T, 9858 out Closure result) 9859 { 9860 node_bsdf_glossy(color, roughness, N, -1, result); 9861 } 9862 9863 void node_bsdf_glass( 9864 vec4 color, float roughness, float ior, vec3 N, float ssr_id, out Closure result) 9865 { 9866 N = normalize(N); 9867 vec3 out_spec, out_refr, ssr_spec; 9868 vec3 refr_color = (refractionDepth > 0.0) ? color.rgb * color.rgb : 9869 color.rgb; /* Simulate 2 transmission event */ 9870 eevee_closure_glass( 9871 N, vec3(1.0), int(ssr_id), roughness, 1.0, ior, out_spec, out_refr, ssr_spec); 9872 out_refr *= refr_color; 9873 out_spec *= color.rgb; 9874 float fresnel = F_eta(ior, dot(N, cameraVec)); 9875 vec3 vN = mat3(ViewMatrix) * N; 9876 result = CLOSURE_DEFAULT; 9877 result.radiance = mix(out_refr, out_spec, fresnel); 9878 result.ssr_data = vec4(ssr_spec * color.rgb * fresnel, roughness); 9879 result.ssr_normal = normal_encode(vN, viewCameraVec); 9880 result.ssr_id = int(ssr_id); 9881 } 9882 9883 void node_bsdf_toon(vec4 color, float size, float tsmooth, vec3 N, out Closure result) 9884 { 9885 node_bsdf_diffuse(color, 0.0, N, result); 9886 } 9887 9888 void node_bsdf_principled(vec4 base_color, 9889 float subsurface, 9890 vec3 subsurface_radius, 9891 vec4 subsurface_color, 9892 float metallic, 9893 float specular, 9894 float specular_tint, 9895 float roughness, 9896 float anisotropic, 9897 float anisotropic_rotation, 9898 float sheen, 9899 float sheen_tint, 9900 float clearcoat, 9901 float clearcoat_roughness, 9902 float ior, 9903 float transmission, 9904 float transmission_roughness, 9905 vec3 N, 9906 vec3 CN, 9907 vec3 T, 9908 vec3 I, 9909 float ssr_id, 9910 float sss_id, 9911 vec3 sss_scale, 9912 out Closure result) 9913 { 9914 N = normalize(N); 9915 ior = max(ior, 1e-5); 9916 metallic = saturate(metallic); 9917 transmission = saturate(transmission); 9918 float dielectric = 1.0 - metallic; 9919 transmission *= dielectric; 9920 sheen *= dielectric; 9921 subsurface_color *= dielectric; 9922 9923 vec3 diffuse, f0, out_diff, out_spec, out_trans, out_refr, ssr_spec; 9924 vec3 ctint = tint_from_color(base_color.rgb); 9925 convert_metallic_to_specular_tinted( 9926 base_color.rgb, ctint, metallic, specular, specular_tint, diffuse, f0); 9927 9928 float NV = dot(N, cameraVec); 9929 vec3 out_sheen = sheen * principled_sheen(NV, ctint, sheen_tint); 9930 9931 /* Far from being accurate, but 2 glossy evaluation is too expensive. 9932 * Most noticeable difference is at grazing angles since the bsdf lut 9933 * f0 color interpolation is done on top of this interpolation. */ 9934 vec3 f0_glass = mix(vec3(1.0), base_color.rgb, specular_tint); 9935 float fresnel = F_eta(ior, NV); 9936 vec3 spec_col = F_color_blend(ior, fresnel, f0_glass) * fresnel; 9937 f0 = mix(f0, spec_col, transmission); 9938 9939 vec3 mixed_ss_base_color = mix(diffuse, subsurface_color.rgb, subsurface); 9940 9941 float sss_scalef = dot(sss_scale, vec3(1.0 / 3.0)) * subsurface; 9942 eevee_closure_principled(N, 9943 mixed_ss_base_color, 9944 f0, 9945 int(ssr_id), 9946 roughness, 9947 CN, 9948 clearcoat * 0.25, 9949 clearcoat_roughness, 9950 1.0, 9951 sss_scalef, 9952 ior, 9953 out_diff, 9954 out_trans, 9955 out_spec, 9956 out_refr, 9957 ssr_spec); 9958 9959 vec3 refr_color = base_color.rgb; 9960 refr_color *= (refractionDepth > 0.0) ? refr_color : 9961 vec3(1.0); /* Simulate 2 transmission event */ 9962 out_refr *= refr_color * (1.0 - fresnel) * transmission; 9963 9964 vec3 vN = mat3(ViewMatrix) * N; 9965 result = CLOSURE_DEFAULT; 9966 result.radiance = out_spec + out_refr; 9967 result.radiance += out_diff * out_sheen; /* Coarse approx. */ 9968 # ifndef USE_SSS 9969 result.radiance += (out_diff + out_trans) * mixed_ss_base_color * (1.0 - transmission); 9970 # endif 9971 result.ssr_data = vec4(ssr_spec, roughness); 9972 result.ssr_normal = normal_encode(vN, viewCameraVec); 9973 result.ssr_id = int(ssr_id); 9974 # ifdef USE_SSS 9975 result.sss_data.a = sss_scalef; 9976 result.sss_data.rgb = out_diff + out_trans; 9977 # ifdef USE_SSS_ALBEDO 9978 result.sss_albedo.rgb = mixed_ss_base_color; 9979 # else 9980 result.sss_data.rgb *= mixed_ss_base_color; 9981 # endif 9982 result.sss_data.rgb *= (1.0 - transmission); 9983 # endif 9984 } 9985 9986 void node_bsdf_principled_dielectric(vec4 base_color, 9987 float subsurface, 9988 vec3 subsurface_radius, 9989 vec4 subsurface_color, 9990 float metallic, 9991 float specular, 9992 float specular_tint, 9993 float roughness, 9994 float anisotropic, 9995 float anisotropic_rotation, 9996 float sheen, 9997 float sheen_tint, 9998 float clearcoat, 9999 float clearcoat_roughness, 10000 float ior, 10001 float transmission, 10002 float transmission_roughness, 10003 vec3 N, 10004 vec3 CN, 10005 vec3 T, 10006 vec3 I, 10007 float ssr_id, 10008 float sss_id, 10009 vec3 sss_scale, 10010 out Closure result) 10011 { 10012 N = normalize(N); 10013 metallic = saturate(metallic); 10014 float dielectric = 1.0 - metallic; 10015 10016 vec3 diffuse, f0, out_diff, out_spec, ssr_spec; 10017 vec3 ctint = tint_from_color(base_color.rgb); 10018 convert_metallic_to_specular_tinted( 10019 base_color.rgb, ctint, metallic, specular, specular_tint, diffuse, f0); 10020 10021 float NV = dot(N, cameraVec); 10022 vec3 out_sheen = sheen * principled_sheen(NV, ctint, sheen_tint); 10023 10024 eevee_closure_default(N, diffuse, f0, int(ssr_id), roughness, 1.0, out_diff, out_spec, ssr_spec); 10025 10026 vec3 vN = mat3(ViewMatrix) * N; 10027 result = CLOSURE_DEFAULT; 10028 result.radiance = out_spec + out_diff * (diffuse + out_sheen); 10029 result.ssr_data = vec4(ssr_spec, roughness); 10030 result.ssr_normal = normal_encode(vN, viewCameraVec); 10031 result.ssr_id = int(ssr_id); 10032 } 10033 10034 void node_bsdf_principled_metallic(vec4 base_color, 10035 float subsurface, 10036 vec3 subsurface_radius, 10037 vec4 subsurface_color, 10038 float metallic, 10039 float specular, 10040 float specular_tint, 10041 float roughness, 10042 float anisotropic, 10043 float anisotropic_rotation, 10044 float sheen, 10045 float sheen_tint, 10046 float clearcoat, 10047 float clearcoat_roughness, 10048 float ior, 10049 float transmission, 10050 float transmission_roughness, 10051 vec3 N, 10052 vec3 CN, 10053 vec3 T, 10054 vec3 I, 10055 float ssr_id, 10056 float sss_id, 10057 vec3 sss_scale, 10058 out Closure result) 10059 { 10060 N = normalize(N); 10061 vec3 out_spec, ssr_spec; 10062 10063 eevee_closure_glossy(N, base_color.rgb, int(ssr_id), roughness, 1.0, out_spec, ssr_spec); 10064 10065 vec3 vN = mat3(ViewMatrix) * N; 10066 result = CLOSURE_DEFAULT; 10067 result.radiance = out_spec; 10068 result.ssr_data = vec4(ssr_spec, roughness); 10069 result.ssr_normal = normal_encode(vN, viewCameraVec); 10070 result.ssr_id = int(ssr_id); 10071 } 10072 10073 void node_bsdf_principled_clearcoat(vec4 base_color, 10074 float subsurface, 10075 vec3 subsurface_radius, 10076 vec4 subsurface_color, 10077 float metallic, 10078 float specular, 10079 float specular_tint, 10080 float roughness, 10081 float anisotropic, 10082 float anisotropic_rotation, 10083 float sheen, 10084 float sheen_tint, 10085 float clearcoat, 10086 float clearcoat_roughness, 10087 float ior, 10088 float transmission, 10089 float transmission_roughness, 10090 vec3 N, 10091 vec3 CN, 10092 vec3 T, 10093 vec3 I, 10094 float ssr_id, 10095 float sss_id, 10096 vec3 sss_scale, 10097 out Closure result) 10098 { 10099 vec3 out_spec, ssr_spec; 10100 N = normalize(N); 10101 10102 eevee_closure_clearcoat(N, 10103 base_color.rgb, 10104 int(ssr_id), 10105 roughness, 10106 CN, 10107 clearcoat * 0.25, 10108 clearcoat_roughness, 10109 1.0, 10110 out_spec, 10111 ssr_spec); 10112 10113 vec3 vN = mat3(ViewMatrix) * N; 10114 result = CLOSURE_DEFAULT; 10115 result.radiance = out_spec; 10116 result.ssr_data = vec4(ssr_spec, roughness); 10117 result.ssr_normal = normal_encode(vN, viewCameraVec); 10118 result.ssr_id = int(ssr_id); 10119 } 10120 10121 void node_bsdf_principled_subsurface(vec4 base_color, 10122 float subsurface, 10123 vec3 subsurface_radius, 10124 vec4 subsurface_color, 10125 float metallic, 10126 float specular, 10127 float specular_tint, 10128 float roughness, 10129 float anisotropic, 10130 float anisotropic_rotation, 10131 float sheen, 10132 float sheen_tint, 10133 float clearcoat, 10134 float clearcoat_roughness, 10135 float ior, 10136 float transmission, 10137 float transmission_roughness, 10138 vec3 N, 10139 vec3 CN, 10140 vec3 T, 10141 vec3 I, 10142 float ssr_id, 10143 float sss_id, 10144 vec3 sss_scale, 10145 out Closure result) 10146 { 10147 metallic = saturate(metallic); 10148 N = normalize(N); 10149 10150 vec3 diffuse, f0, out_diff, out_spec, out_trans, ssr_spec; 10151 vec3 ctint = tint_from_color(base_color.rgb); 10152 convert_metallic_to_specular_tinted( 10153 base_color.rgb, ctint, metallic, specular, specular_tint, diffuse, f0); 10154 10155 subsurface_color = subsurface_color * (1.0 - metallic); 10156 vec3 mixed_ss_base_color = mix(diffuse, subsurface_color.rgb, subsurface); 10157 float sss_scalef = dot(sss_scale, vec3(1.0 / 3.0)) * subsurface; 10158 10159 float NV = dot(N, cameraVec); 10160 vec3 out_sheen = sheen * principled_sheen(NV, ctint, sheen_tint); 10161 10162 eevee_closure_skin(N, 10163 mixed_ss_base_color, 10164 f0, 10165 int(ssr_id), 10166 roughness, 10167 1.0, 10168 sss_scalef, 10169 out_diff, 10170 out_trans, 10171 out_spec, 10172 ssr_spec); 10173 10174 vec3 vN = mat3(ViewMatrix) * N; 10175 result = CLOSURE_DEFAULT; 10176 result.radiance = out_spec; 10177 result.ssr_data = vec4(ssr_spec, roughness); 10178 result.ssr_normal = normal_encode(vN, viewCameraVec); 10179 result.ssr_id = int(ssr_id); 10180 # ifdef USE_SSS 10181 result.sss_data.a = sss_scalef; 10182 result.sss_data.rgb = out_diff + out_trans; 10183 # ifdef USE_SSS_ALBEDO 10184 result.sss_albedo.rgb = mixed_ss_base_color; 10185 # else 10186 result.sss_data.rgb *= mixed_ss_base_color; 10187 # endif 10188 # else 10189 result.radiance += (out_diff + out_trans) * mixed_ss_base_color; 10190 # endif 10191 result.radiance += out_diff * out_sheen; 10192 } 10193 10194 void node_bsdf_principled_glass(vec4 base_color, 10195 float subsurface, 10196 vec3 subsurface_radius, 10197 vec4 subsurface_color, 10198 float metallic, 10199 float specular, 10200 float specular_tint, 10201 float roughness, 10202 float anisotropic, 10203 float anisotropic_rotation, 10204 float sheen, 10205 float sheen_tint, 10206 float clearcoat, 10207 float clearcoat_roughness, 10208 float ior, 10209 float transmission, 10210 float transmission_roughness, 10211 vec3 N, 10212 vec3 CN, 10213 vec3 T, 10214 vec3 I, 10215 float ssr_id, 10216 float sss_id, 10217 vec3 sss_scale, 10218 out Closure result) 10219 { 10220 ior = max(ior, 1e-5); 10221 N = normalize(N); 10222 10223 vec3 f0, out_spec, out_refr, ssr_spec; 10224 f0 = mix(vec3(1.0), base_color.rgb, specular_tint); 10225 10226 eevee_closure_glass( 10227 N, vec3(1.0), int(ssr_id), roughness, 1.0, ior, out_spec, out_refr, ssr_spec); 10228 10229 vec3 refr_color = base_color.rgb; 10230 refr_color *= (refractionDepth > 0.0) ? refr_color : 10231 vec3(1.0); /* Simulate 2 transmission events */ 10232 out_refr *= refr_color; 10233 10234 float fresnel = F_eta(ior, dot(N, cameraVec)); 10235 vec3 spec_col = F_color_blend(ior, fresnel, f0); 10236 out_spec *= spec_col; 10237 ssr_spec *= spec_col * fresnel; 10238 10239 vec3 vN = mat3(ViewMatrix) * N; 10240 result = CLOSURE_DEFAULT; 10241 result.radiance = mix(out_refr, out_spec, fresnel); 10242 result.ssr_data = vec4(ssr_spec, roughness); 10243 result.ssr_normal = normal_encode(vN, viewCameraVec); 10244 result.ssr_id = int(ssr_id); 10245 } 10246 10247 void node_bsdf_translucent(vec4 color, vec3 N, out Closure result) 10248 { 10249 node_bsdf_diffuse(color, 0.0, -N, result); 10250 } 10251 10252 void node_bsdf_transparent(vec4 color, out Closure result) 10253 { 10254 /* this isn't right */ 10255 result = CLOSURE_DEFAULT; 10256 result.radiance = vec3(0.0); 10257 result.opacity = clamp(1.0 - dot(color.rgb, vec3(0.3333334)), 0.0, 1.0); 10258 result.ssr_id = TRANSPARENT_CLOSURE_FLAG; 10259 } 10260 10261 void node_bsdf_velvet(vec4 color, float sigma, vec3 N, out Closure result) 10262 { 10263 node_bsdf_diffuse(color, 0.0, N, result); 10264 } 10265 10266 void node_subsurface_scattering(vec4 color, 10267 float scale, 10268 vec3 radius, 10269 float sharpen, 10270 float texture_blur, 10271 vec3 N, 10272 float sss_id, 10273 out Closure result) 10274 { 10275 # if defined(USE_SSS) 10276 N = normalize(N); 10277 vec3 out_diff, out_trans; 10278 vec3 vN = mat3(ViewMatrix) * N; 10279 result = CLOSURE_DEFAULT; 10280 result.ssr_data = vec4(0.0); 10281 result.ssr_normal = normal_encode(vN, viewCameraVec); 10282 result.ssr_id = -1; 10283 result.sss_data.a = scale; 10284 eevee_closure_subsurface(N, color.rgb, 1.0, scale, out_diff, out_trans); 10285 result.sss_data.rgb = out_diff + out_trans; 10286 # ifdef USE_SSS_ALBEDO 10287 /* Not perfect for texture_blur not exactly equal to 0.0 or 1.0. */ 10288 result.sss_albedo.rgb = mix(color.rgb, vec3(1.0), texture_blur); 10289 result.sss_data.rgb *= mix(vec3(1.0), color.rgb, texture_blur); 10290 # else 10291 result.sss_data.rgb *= color.rgb; 10292 # endif 10293 # else 10294 node_bsdf_diffuse(color, 0.0, N, result); 10295 # endif 10296 } 10297 10298 void node_bsdf_refraction(vec4 color, float roughness, float ior, vec3 N, out Closure result) 10299 { 10300 N = normalize(N); 10301 vec3 out_refr; 10302 color.rgb *= (refractionDepth > 0.0) ? color.rgb : vec3(1.0); /* Simulate 2 absorption event. */ 10303 eevee_closure_refraction(N, roughness, ior, out_refr); 10304 vec3 vN = mat3(ViewMatrix) * N; 10305 result = CLOSURE_DEFAULT; 10306 result.ssr_normal = normal_encode(vN, viewCameraVec); 10307 result.radiance = out_refr * color.rgb; 10308 result.ssr_id = REFRACT_CLOSURE_FLAG; 10309 } 10310 10311 void node_ambient_occlusion( 10312 vec4 color, float distance, vec3 normal, out vec4 result_color, out float result_ao) 10313 { 10314 vec3 bent_normal; 10315 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 10316 result_ao = occlusion_compute(normalize(normal), viewPosition, 1.0, rand, bent_normal); 10317 result_color = result_ao * color; 10318 } 10319 10320 #endif /* VOLUMETRICS */ 10321 10322 /* emission */ 10323 10324 void node_emission(vec4 color, float strength, vec3 vN, out Closure result) 10325 { 10326 #ifndef VOLUMETRICS 10327 color *= strength; 10328 result = CLOSURE_DEFAULT; 10329 result.radiance = color.rgb; 10330 result.opacity = color.a; 10331 result.ssr_normal = normal_encode(vN, viewCameraVec); 10332 #else 10333 result = Closure(vec3(0.0), vec3(0.0), color.rgb * strength, 0.0); 10334 #endif 10335 } 10336 10337 void node_wireframe(float size, vec2 barycentric, vec3 barycentric_dist, out float fac) 10338 { 10339 vec3 barys = barycentric.xyy; 10340 barys.z = 1.0 - barycentric.x - barycentric.y; 10341 10342 size *= 0.5; 10343 vec3 s = step(-size, -barys * barycentric_dist); 10344 10345 fac = max(s.x, max(s.y, s.z)); 10346 } 10347 10348 void node_wireframe_screenspace(float size, vec2 barycentric, out float fac) 10349 { 10350 vec3 barys = barycentric.xyy; 10351 barys.z = 1.0 - barycentric.x - barycentric.y; 10352 10353 size *= (1.0 / 3.0); 10354 vec3 dx = dFdx(barys); 10355 vec3 dy = dFdy(barys); 10356 vec3 deltas = sqrt(dx * dx + dy * dy); 10357 10358 vec3 s = step(-deltas * size, -barys); 10359 10360 fac = max(s.x, max(s.y, s.z)); 10361 } 10362 10363 /* background */ 10364 10365 void node_tex_environment_texco(vec3 viewvec, out vec3 worldvec) 10366 { 10367 #ifdef MESH_SHADER 10368 worldvec = worldPosition; 10369 #else 10370 vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(viewvec, 1.0) : vec4(0.0, 0.0, 1.0, 1.0); 10371 vec4 co_homogenous = (ProjectionMatrixInverse * v); 10372 10373 vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0); 10374 # if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE) 10375 worldvec = (ViewMatrixInverse * co).xyz; 10376 # else 10377 worldvec = (ModelViewMatrixInverse * co).xyz; 10378 # endif 10379 #endif 10380 } 10381 10382 void node_background(vec4 color, float strength, out Closure result) 10383 { 10384 #ifndef VOLUMETRICS 10385 color *= strength; 10386 result = CLOSURE_DEFAULT; 10387 result.radiance = color.rgb; 10388 result.opacity = color.a; 10389 #else 10390 result = CLOSURE_DEFAULT; 10391 #endif 10392 } 10393 10394 /* volumes */ 10395 10396 void node_volume_scatter(vec4 color, float density, float anisotropy, out Closure result) 10397 { 10398 #ifdef VOLUMETRICS 10399 result = Closure(vec3(0.0), color.rgb * density, vec3(0.0), anisotropy); 10400 #else 10401 result = CLOSURE_DEFAULT; 10402 #endif 10403 } 10404 10405 void node_volume_absorption(vec4 color, float density, out Closure result) 10406 { 10407 #ifdef VOLUMETRICS 10408 result = Closure((1.0 - color.rgb) * density, vec3(0.0), vec3(0.0), 0.0); 10409 #else 10410 result = CLOSURE_DEFAULT; 10411 #endif 10412 } 10413 10414 void node_blackbody(float temperature, sampler1DArray spectrummap, float layer, out vec4 color) 10415 { 10416 if (temperature >= 12000.0) { 10417 color = vec4(0.826270103, 0.994478524, 1.56626022, 1.0); 10418 } 10419 else if (temperature < 965.0) { 10420 color = vec4(4.70366907, 0.0, 0.0, 1.0); 10421 } 10422 else { 10423 float t = (temperature - 965.0) / (12000.0 - 965.0); 10424 color = vec4(texture(spectrummap, vec2(t, layer)).rgb, 1.0); 10425 } 10426 } 10427 10428 void node_volume_principled(vec4 color, 10429 float density, 10430 float anisotropy, 10431 vec4 absorption_color, 10432 float emission_strength, 10433 vec4 emission_color, 10434 float blackbody_intensity, 10435 vec4 blackbody_tint, 10436 float temperature, 10437 float density_attribute, 10438 vec4 color_attribute, 10439 float temperature_attribute, 10440 sampler1DArray spectrummap, 10441 float layer, 10442 out Closure result) 10443 { 10444 #ifdef VOLUMETRICS 10445 vec3 absorption_coeff = vec3(0.0); 10446 vec3 scatter_coeff = vec3(0.0); 10447 vec3 emission_coeff = vec3(0.0); 10448 10449 /* Compute density. */ 10450 density = max(density, 0.0); 10451 10452 if (density > 1e-5) { 10453 density = max(density * density_attribute, 0.0); 10454 } 10455 10456 if (density > 1e-5) { 10457 /* Compute scattering and absorption coefficients. */ 10458 vec3 scatter_color = color.rgb * color_attribute.rgb; 10459 10460 scatter_coeff = scatter_color * density; 10461 absorption_color.rgb = sqrt(max(absorption_color.rgb, 0.0)); 10462 absorption_coeff = max(1.0 - scatter_color, 0.0) * max(1.0 - absorption_color.rgb, 0.0) * 10463 density; 10464 } 10465 10466 /* Compute emission. */ 10467 emission_strength = max(emission_strength, 0.0); 10468 10469 if (emission_strength > 1e-5) { 10470 emission_coeff += emission_strength * emission_color.rgb; 10471 } 10472 10473 if (blackbody_intensity > 1e-3) { 10474 /* Add temperature from attribute. */ 10475 float T = max(temperature * max(temperature_attribute, 0.0), 0.0); 10476 10477 /* Stefan-Boltzman law. */ 10478 float T2 = T * T; 10479 float T4 = T2 * T2; 10480 float sigma = 5.670373e-8 * 1e-6 / M_PI; 10481 float intensity = sigma * mix(1.0, T4, blackbody_intensity); 10482 10483 if (intensity > 1e-5) { 10484 vec4 bb; 10485 node_blackbody(T, spectrummap, layer, bb); 10486 emission_coeff += bb.rgb * blackbody_tint.rgb * intensity; 10487 } 10488 } 10489 10490 result = Closure(absorption_coeff, scatter_coeff, emission_coeff, anisotropy); 10491 #else 10492 result = CLOSURE_DEFAULT; 10493 #endif 10494 } 10495 10496 /* closures */ 10497 10498 void node_mix_shader(float fac, Closure shader1, Closure shader2, out Closure shader) 10499 { 10500 shader = closure_mix(shader1, shader2, fac); 10501 } 10502 10503 void node_add_shader(Closure shader1, Closure shader2, out Closure shader) 10504 { 10505 shader = closure_add(shader1, shader2); 10506 } 10507 10508 /* fresnel */ 10509 10510 void node_fresnel(float ior, vec3 N, vec3 I, out float result) 10511 { 10512 N = normalize(N); 10513 /* handle perspective/orthographic */ 10514 vec3 I_view = (ProjectionMatrix[3][3] == 0.0) ? normalize(I) : vec3(0.0, 0.0, -1.0); 10515 10516 float eta = max(ior, 0.00001); 10517 result = fresnel_dielectric(I_view, N, (gl_FrontFacing) ? eta : 1.0 / eta); 10518 } 10519 10520 /* layer_weight */ 10521 10522 void node_layer_weight(float blend, vec3 N, vec3 I, out float fresnel, out float facing) 10523 { 10524 N = normalize(N); 10525 10526 /* fresnel */ 10527 float eta = max(1.0 - blend, 0.00001); 10528 vec3 I_view = (ProjectionMatrix[3][3] == 0.0) ? normalize(I) : vec3(0.0, 0.0, -1.0); 10529 10530 fresnel = fresnel_dielectric(I_view, N, (gl_FrontFacing) ? 1.0 / eta : eta); 10531 10532 /* facing */ 10533 facing = abs(dot(I_view, N)); 10534 if (blend != 0.5) { 10535 blend = clamp(blend, 0.0, 0.99999); 10536 blend = (blend < 0.5) ? 2.0 * blend : 0.5 / (1.0 - blend); 10537 facing = pow(facing, blend); 10538 } 10539 facing = 1.0 - facing; 10540 } 10541 10542 /* gamma */ 10543 10544 void node_gamma(vec4 col, float gamma, out vec4 outcol) 10545 { 10546 outcol = col; 10547 10548 if (col.r > 0.0) 10549 outcol.r = compatible_pow(col.r, gamma); 10550 if (col.g > 0.0) 10551 outcol.g = compatible_pow(col.g, gamma); 10552 if (col.b > 0.0) 10553 outcol.b = compatible_pow(col.b, gamma); 10554 } 10555 10556 /* geometry */ 10557 10558 void node_attribute_volume_density(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf) 10559 { 10560 #if defined(MESH_SHADER) && defined(VOLUMETRICS) 10561 vec3 cos = volumeObjectLocalCoord; 10562 #else 10563 vec3 cos = vec3(0.0); 10564 #endif 10565 outvec = texture(tex, cos).aaa; 10566 outcol = vec4(outvec, 1.0); 10567 outf = dot(vec3(1.0 / 3.0), outvec); 10568 } 10569 10570 uniform vec3 volumeColor = vec3(1.0); 10571 10572 void node_attribute_volume_color(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf) 10573 { 10574 #if defined(MESH_SHADER) && defined(VOLUMETRICS) 10575 vec3 cos = volumeObjectLocalCoord; 10576 #else 10577 vec3 cos = vec3(0.0); 10578 #endif 10579 10580 vec4 value = texture(tex, cos).rgba; 10581 /* Density is premultiplied for interpolation, divide it out here. */ 10582 if (value.a > 1e-8) 10583 value.rgb /= value.a; 10584 10585 outvec = value.rgb * volumeColor; 10586 outcol = vec4(outvec, 1.0); 10587 outf = dot(vec3(1.0 / 3.0), outvec); 10588 } 10589 10590 void node_attribute_volume_flame(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf) 10591 { 10592 #if defined(MESH_SHADER) && defined(VOLUMETRICS) 10593 vec3 cos = volumeObjectLocalCoord; 10594 #else 10595 vec3 cos = vec3(0.0); 10596 #endif 10597 outf = texture(tex, cos).r; 10598 outvec = vec3(outf, outf, outf); 10599 outcol = vec4(outf, outf, outf, 1.0); 10600 } 10601 10602 void node_attribute_volume_temperature( 10603 sampler3D tex, vec2 temperature, out vec4 outcol, out vec3 outvec, out float outf) 10604 { 10605 #if defined(MESH_SHADER) && defined(VOLUMETRICS) 10606 vec3 cos = volumeObjectLocalCoord; 10607 #else 10608 vec3 cos = vec3(0.0); 10609 #endif 10610 float flame = texture(tex, cos).r; 10611 10612 outf = (flame > 0.01) ? temperature.x + flame * (temperature.y - temperature.x) : 0.0; 10613 outvec = vec3(outf, outf, outf); 10614 outcol = vec4(outf, outf, outf, 1.0); 10615 } 10616 10617 void node_attribute(vec3 attr, out vec4 outcol, out vec3 outvec, out float outf) 10618 { 10619 outcol = vec4(attr, 1.0); 10620 outvec = attr; 10621 outf = dot(vec3(1.0 / 3.0), attr); 10622 } 10623 10624 void node_uvmap(vec3 attr_uv, out vec3 outvec) 10625 { 10626 outvec = attr_uv; 10627 } 10628 10629 void tangent_orco_x(vec3 orco_in, out vec3 orco_out) 10630 { 10631 orco_out = orco_in.xzy * vec3(0.0, -0.5, 0.5) + vec3(0.0, 0.25, -0.25); 10632 } 10633 10634 void tangent_orco_y(vec3 orco_in, out vec3 orco_out) 10635 { 10636 orco_out = orco_in.zyx * vec3(-0.5, 0.0, 0.5) + vec3(0.25, 0.0, -0.25); 10637 } 10638 10639 void tangent_orco_z(vec3 orco_in, out vec3 orco_out) 10640 { 10641 orco_out = orco_in.yxz * vec3(-0.5, 0.5, 0.0) + vec3(0.25, -0.25, 0.0); 10642 } 10643 10644 void node_tangentmap(vec4 attr_tangent, mat4 toworld, out vec3 tangent) 10645 { 10646 tangent = normalize((toworld * vec4(attr_tangent.xyz, 0.0)).xyz); 10647 } 10648 10649 void node_tangent(vec3 N, vec3 orco, mat4 objmat, mat4 toworld, out vec3 T) 10650 { 10651 #ifndef VOLUMETRICS 10652 N = normalize(gl_FrontFacing ? worldNormal : -worldNormal); 10653 #else 10654 N = (toworld * vec4(N, 0.0)).xyz; 10655 #endif 10656 T = (objmat * vec4(orco, 0.0)).xyz; 10657 T = cross(N, normalize(cross(T, N))); 10658 } 10659 10660 void node_geometry(vec3 I, 10661 vec3 N, 10662 vec3 orco, 10663 mat4 objmat, 10664 mat4 toworld, 10665 vec2 barycentric, 10666 out vec3 position, 10667 out vec3 normal, 10668 out vec3 tangent, 10669 out vec3 true_normal, 10670 out vec3 incoming, 10671 out vec3 parametric, 10672 out float backfacing, 10673 out float pointiness) 10674 { 10675 /* handle perspective/orthographic */ 10676 vec3 I_view = (ProjectionMatrix[3][3] == 0.0) ? normalize(I) : vec3(0.0, 0.0, -1.0); 10677 incoming = -(toworld * vec4(I_view, 0.0)).xyz; 10678 10679 #if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE) 10680 position = -incoming; 10681 true_normal = normal = incoming; 10682 tangent = parametric = vec3(0.0); 10683 vec3(0.0); 10684 backfacing = 0.0; 10685 pointiness = 0.0; 10686 #else 10687 10688 position = worldPosition; 10689 # ifndef VOLUMETRICS 10690 normal = normalize(gl_FrontFacing ? worldNormal : -worldNormal); 10691 vec3 B = dFdx(worldPosition); 10692 vec3 T = dFdy(worldPosition); 10693 true_normal = normalize(cross(B, T)); 10694 # else 10695 normal = (toworld * vec4(N, 0.0)).xyz; 10696 true_normal = normal; 10697 # endif 10698 tangent_orco_z(orco, orco); 10699 node_tangent(N, orco, objmat, toworld, tangent); 10700 10701 parametric = vec3(barycentric, 0.0); 10702 backfacing = (gl_FrontFacing) ? 0.0 : 1.0; 10703 pointiness = 0.5; 10704 #endif 10705 } 10706 10707 void generated_texco(vec3 I, vec3 attr_orco, out vec3 generated) 10708 { 10709 vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(I, 1.0) : vec4(0.0, 0.0, 1.0, 1.0); 10710 vec4 co_homogenous = (ProjectionMatrixInverse * v); 10711 vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0); 10712 co.xyz = normalize(co.xyz); 10713 #if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE) 10714 generated = (ViewMatrixInverse * co).xyz; 10715 #else 10716 generated_from_orco(attr_orco, generated); 10717 #endif 10718 } 10719 10720 void node_tex_coord(vec3 I, 10721 vec3 N, 10722 mat4 viewinvmat, 10723 mat4 obinvmat, 10724 vec4 camerafac, 10725 vec3 attr_orco, 10726 vec3 attr_uv, 10727 out vec3 generated, 10728 out vec3 normal, 10729 out vec3 uv, 10730 out vec3 object, 10731 out vec3 camera, 10732 out vec3 window, 10733 out vec3 reflection) 10734 { 10735 generated = attr_orco; 10736 normal = normalize(NormalMatrixInverse * N); 10737 uv = attr_uv; 10738 object = (obinvmat * (viewinvmat * vec4(I, 1.0))).xyz; 10739 camera = vec3(I.xy, -I.z); 10740 vec4 projvec = ProjectionMatrix * vec4(I, 1.0); 10741 window = vec3(mtex_2d_mapping(projvec.xyz / projvec.w).xy * camerafac.xy + camerafac.zw, 0.0); 10742 10743 vec3 shade_I = (ProjectionMatrix[3][3] == 0.0) ? normalize(I) : vec3(0.0, 0.0, -1.0); 10744 vec3 view_reflection = reflect(shade_I, normalize(N)); 10745 reflection = (viewinvmat * vec4(view_reflection, 0.0)).xyz; 10746 } 10747 10748 void node_tex_coord_background(vec3 I, 10749 vec3 N, 10750 mat4 viewinvmat, 10751 mat4 obinvmat, 10752 vec4 camerafac, 10753 vec3 attr_orco, 10754 vec3 attr_uv, 10755 out vec3 generated, 10756 out vec3 normal, 10757 out vec3 uv, 10758 out vec3 object, 10759 out vec3 camera, 10760 out vec3 window, 10761 out vec3 reflection) 10762 { 10763 vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(I, 1.0) : vec4(0.0, 0.0, 1.0, 1.0); 10764 vec4 co_homogenous = (ProjectionMatrixInverse * v); 10765 10766 vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0); 10767 10768 co = normalize(co); 10769 10770 #if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE) 10771 vec3 coords = (ViewMatrixInverse * co).xyz; 10772 #else 10773 vec3 coords = (ModelViewMatrixInverse * co).xyz; 10774 #endif 10775 10776 generated = coords; 10777 normal = -coords; 10778 uv = vec3(attr_uv.xy, 0.0); 10779 object = coords; 10780 10781 camera = vec3(co.xy, -co.z); 10782 window = vec3(mtex_2d_mapping(I).xy * camerafac.xy + camerafac.zw, 0.0); 10783 10784 reflection = -coords; 10785 } 10786 10787 #if defined(WORLD_BACKGROUND) || (defined(PROBE_CAPTURE) && !defined(MESH_SHADER)) 10788 # define node_tex_coord node_tex_coord_background 10789 #endif 10790 10791 /* textures */ 10792 10793 float calc_gradient(vec3 p, int gradient_type) 10794 { 10795 float x, y, z; 10796 x = p.x; 10797 y = p.y; 10798 z = p.z; 10799 if (gradient_type == 0) { /* linear */ 10800 return x; 10801 } 10802 else if (gradient_type == 1) { /* quadratic */ 10803 float r = max(x, 0.0); 10804 return r * r; 10805 } 10806 else if (gradient_type == 2) { /* easing */ 10807 float r = min(max(x, 0.0), 1.0); 10808 float t = r * r; 10809 return (3.0 * t - 2.0 * t * r); 10810 } 10811 else if (gradient_type == 3) { /* diagonal */ 10812 return (x + y) * 0.5; 10813 } 10814 else if (gradient_type == 4) { /* radial */ 10815 return atan(y, x) / (M_PI * 2) + 0.5; 10816 } 10817 else { 10818 /* Bias a little bit for the case where p is a unit length vector, 10819 * to get exactly zero instead of a small random value depending 10820 * on float precision. */ 10821 float r = max(0.999999 - sqrt(x * x + y * y + z * z), 0.0); 10822 if (gradient_type == 5) { /* quadratic sphere */ 10823 return r * r; 10824 } 10825 else if (gradient_type == 6) { /* sphere */ 10826 return r; 10827 } 10828 } 10829 return 0.0; 10830 } 10831 10832 void node_tex_gradient(vec3 co, float gradient_type, out vec4 color, out float fac) 10833 { 10834 float f = calc_gradient(co, int(gradient_type)); 10835 f = clamp(f, 0.0, 1.0); 10836 10837 color = vec4(f, f, f, 1.0); 10838 fac = f; 10839 } 10840 10841 void node_tex_checker( 10842 vec3 co, vec4 color1, vec4 color2, float scale, out vec4 color, out float fac) 10843 { 10844 vec3 p = co * scale; 10845 10846 /* Prevent precision issues on unit coordinates. */ 10847 p = (p + 0.000001) * 0.999999; 10848 10849 int xi = int(abs(floor(p.x))); 10850 int yi = int(abs(floor(p.y))); 10851 int zi = int(abs(floor(p.z))); 10852 10853 bool check = ((mod(xi, 2) == mod(yi, 2)) == bool(mod(zi, 2))); 10854 10855 color = check ? color1 : color2; 10856 fac = check ? 1.0 : 0.0; 10857 } 10858 10859 vec2 calc_brick_texture(vec3 p, 10860 float mortar_size, 10861 float mortar_smooth, 10862 float bias, 10863 float brick_width, 10864 float row_height, 10865 float offset_amount, 10866 int offset_frequency, 10867 float squash_amount, 10868 int squash_frequency) 10869 { 10870 int bricknum, rownum; 10871 float offset = 0.0; 10872 float x, y; 10873 10874 rownum = floor_to_int(p.y / row_height); 10875 10876 if (offset_frequency != 0 && squash_frequency != 0) { 10877 brick_width *= (rownum % squash_frequency != 0) ? 1.0 : squash_amount; /* squash */ 10878 offset = (rownum % offset_frequency != 0) ? 0.0 : (brick_width * offset_amount); /* offset */ 10879 } 10880 10881 bricknum = floor_to_int((p.x + offset) / brick_width); 10882 10883 x = (p.x + offset) - brick_width * bricknum; 10884 y = p.y - row_height * rownum; 10885 10886 float tint = clamp((integer_noise((rownum << 16) + (bricknum & 0xFFFF)) + bias), 0.0, 1.0); 10887 10888 float min_dist = min(min(x, y), min(brick_width - x, row_height - y)); 10889 if (min_dist >= mortar_size) { 10890 return vec2(tint, 0.0); 10891 } 10892 else if (mortar_smooth == 0.0) { 10893 return vec2(tint, 1.0); 10894 } 10895 else { 10896 min_dist = 1.0 - min_dist / mortar_size; 10897 return vec2(tint, smoothstep(0.0, mortar_smooth, min_dist)); 10898 } 10899 } 10900 10901 void node_tex_brick(vec3 co, 10902 vec4 color1, 10903 vec4 color2, 10904 vec4 mortar, 10905 float scale, 10906 float mortar_size, 10907 float mortar_smooth, 10908 float bias, 10909 float brick_width, 10910 float row_height, 10911 float offset_amount, 10912 float offset_frequency, 10913 float squash_amount, 10914 float squash_frequency, 10915 out vec4 color, 10916 out float fac) 10917 { 10918 vec2 f2 = calc_brick_texture(co * scale, 10919 mortar_size, 10920 mortar_smooth, 10921 bias, 10922 brick_width, 10923 row_height, 10924 offset_amount, 10925 int(offset_frequency), 10926 squash_amount, 10927 int(squash_frequency)); 10928 float tint = f2.x; 10929 float f = f2.y; 10930 if (f != 1.0) { 10931 float facm = 1.0 - tint; 10932 color1 = facm * color1 + tint * color2; 10933 } 10934 color = mix(color1, mortar, f); 10935 fac = f; 10936 } 10937 10938 void node_tex_clouds(vec3 co, float size, out vec4 color, out float fac) 10939 { 10940 color = vec4(1.0); 10941 fac = 1.0; 10942 } 10943 10944 void node_tex_environment_equirectangular(vec3 co, float clamp_size, sampler2D ima, out vec3 uv) 10945 { 10946 vec3 nco = normalize(co); 10947 uv.x = -atan(nco.y, nco.x) / (2.0 * M_PI) + 0.5; 10948 uv.y = atan(nco.z, hypot(nco.x, nco.y)) / M_PI + 0.5; 10949 10950 /* Fix pole bleeding */ 10951 float half_height = clamp_size / float(textureSize(ima, 0).y); 10952 uv.y = clamp(uv.y, half_height, 1.0 - half_height); 10953 uv.z = 0.0; 10954 } 10955 10956 void node_tex_environment_mirror_ball(vec3 co, out vec3 uv) 10957 { 10958 vec3 nco = normalize(co); 10959 nco.y -= 1.0; 10960 10961 float div = 2.0 * sqrt(max(-0.5 * nco.y, 0.0)); 10962 nco /= max(1e-8, div); 10963 10964 uv = 0.5 * nco.xzz + 0.5; 10965 } 10966 10967 void node_tex_environment_empty(vec3 co, out vec4 color) 10968 { 10969 color = vec4(1.0, 0.0, 1.0, 1.0); 10970 } 10971 10972 /* 16bits floats limits. Higher/Lower values produce +/-inf. */ 10973 #define safe_color(a) (clamp(a, -65520.0, 65520.0)) 10974 10975 void node_tex_image_linear(vec3 co, sampler2D ima, out vec4 color, out float alpha) 10976 { 10977 color = safe_color(texture(ima, co.xy)); 10978 alpha = color.a; 10979 } 10980 10981 void node_tex_image_linear_no_mip(vec3 co, sampler2D ima, out vec4 color, out float alpha) 10982 { 10983 color = safe_color(textureLod(ima, co.xy, 0.0)); 10984 alpha = color.a; 10985 } 10986 10987 void node_tex_image_nearest(vec3 co, sampler2D ima, out vec4 color, out float alpha) 10988 { 10989 ivec2 pix = ivec2(fract(co.xy) * textureSize(ima, 0).xy); 10990 color = safe_color(texelFetch(ima, pix, 0)); 10991 alpha = color.a; 10992 } 10993 10994 /* @arg f: signed distance to texel center. */ 10995 void cubic_bspline_coefs(vec2 f, out vec2 w0, out vec2 w1, out vec2 w2, out vec2 w3) 10996 { 10997 vec2 f2 = f * f; 10998 vec2 f3 = f2 * f; 10999 /* Bspline coefs (optimized) */ 11000 w3 = f3 / 6.0; 11001 w0 = -w3 + f2 * 0.5 - f * 0.5 + 1.0 / 6.0; 11002 w1 = f3 * 0.5 - f2 * 1.0 + 2.0 / 3.0; 11003 w2 = 1.0 - w0 - w1 - w3; 11004 } 11005 11006 void node_tex_image_cubic_ex( 11007 vec3 co, sampler2D ima, float do_extend, out vec4 color, out float alpha) 11008 { 11009 vec2 tex_size = vec2(textureSize(ima, 0).xy); 11010 11011 co.xy *= tex_size; 11012 /* texel center */ 11013 vec2 tc = floor(co.xy - 0.5) + 0.5; 11014 vec2 w0, w1, w2, w3; 11015 cubic_bspline_coefs(co.xy - tc, w0, w1, w2, w3); 11016 11017 #if 1 /* Optimized version using 4 filtered tap. */ 11018 vec2 s0 = w0 + w1; 11019 vec2 s1 = w2 + w3; 11020 11021 vec2 f0 = w1 / (w0 + w1); 11022 vec2 f1 = w3 / (w2 + w3); 11023 11024 vec4 final_co; 11025 final_co.xy = tc - 1.0 + f0; 11026 final_co.zw = tc + 1.0 + f1; 11027 11028 if (do_extend == 1.0) { 11029 final_co = clamp(final_co, vec4(0.5), tex_size.xyxy - 0.5); 11030 } 11031 final_co /= tex_size.xyxy; 11032 11033 color = safe_color(textureLod(ima, final_co.xy, 0.0)) * s0.x * s0.y; 11034 color += safe_color(textureLod(ima, final_co.zy, 0.0)) * s1.x * s0.y; 11035 color += safe_color(textureLod(ima, final_co.xw, 0.0)) * s0.x * s1.y; 11036 color += safe_color(textureLod(ima, final_co.zw, 0.0)) * s1.x * s1.y; 11037 11038 #else /* Reference bruteforce 16 tap. */ 11039 color = texelFetch(ima, ivec2(tc + vec2(-1.0, -1.0)), 0) * w0.x * w0.y; 11040 color += texelFetch(ima, ivec2(tc + vec2(0.0, -1.0)), 0) * w1.x * w0.y; 11041 color += texelFetch(ima, ivec2(tc + vec2(1.0, -1.0)), 0) * w2.x * w0.y; 11042 color += texelFetch(ima, ivec2(tc + vec2(2.0, -1.0)), 0) * w3.x * w0.y; 11043 11044 color += texelFetch(ima, ivec2(tc + vec2(-1.0, 0.0)), 0) * w0.x * w1.y; 11045 color += texelFetch(ima, ivec2(tc + vec2(0.0, 0.0)), 0) * w1.x * w1.y; 11046 color += texelFetch(ima, ivec2(tc + vec2(1.0, 0.0)), 0) * w2.x * w1.y; 11047 color += texelFetch(ima, ivec2(tc + vec2(2.0, 0.0)), 0) * w3.x * w1.y; 11048 11049 color += texelFetch(ima, ivec2(tc + vec2(-1.0, 1.0)), 0) * w0.x * w2.y; 11050 color += texelFetch(ima, ivec2(tc + vec2(0.0, 1.0)), 0) * w1.x * w2.y; 11051 color += texelFetch(ima, ivec2(tc + vec2(1.0, 1.0)), 0) * w2.x * w2.y; 11052 color += texelFetch(ima, ivec2(tc + vec2(2.0, 1.0)), 0) * w3.x * w2.y; 11053 11054 color += texelFetch(ima, ivec2(tc + vec2(-1.0, 2.0)), 0) * w0.x * w3.y; 11055 color += texelFetch(ima, ivec2(tc + vec2(0.0, 2.0)), 0) * w1.x * w3.y; 11056 color += texelFetch(ima, ivec2(tc + vec2(1.0, 2.0)), 0) * w2.x * w3.y; 11057 color += texelFetch(ima, ivec2(tc + vec2(2.0, 2.0)), 0) * w3.x * w3.y; 11058 #endif 11059 11060 alpha = color.a; 11061 } 11062 11063 void node_tex_image_cubic(vec3 co, sampler2D ima, out vec4 color, out float alpha) 11064 { 11065 node_tex_image_cubic_ex(co, ima, 0.0, color, alpha); 11066 } 11067 11068 void node_tex_image_cubic_extend(vec3 co, sampler2D ima, out vec4 color, out float alpha) 11069 { 11070 node_tex_image_cubic_ex(co, ima, 1.0, color, alpha); 11071 } 11072 11073 void node_tex_image_smart(vec3 co, sampler2D ima, out vec4 color, out float alpha) 11074 { 11075 /* use cubic for now */ 11076 node_tex_image_cubic_ex(co, ima, 0.0, color, alpha); 11077 } 11078 11079 void tex_box_sample_linear( 11080 vec3 texco, vec3 N, sampler2D ima, out vec4 color1, out vec4 color2, out vec4 color3) 11081 { 11082 /* X projection */ 11083 vec2 uv = texco.yz; 11084 if (N.x < 0.0) { 11085 uv.x = 1.0 - uv.x; 11086 } 11087 color1 = texture(ima, uv); 11088 /* Y projection */ 11089 uv = texco.xz; 11090 if (N.y > 0.0) { 11091 uv.x = 1.0 - uv.x; 11092 } 11093 color2 = texture(ima, uv); 11094 /* Z projection */ 11095 uv = texco.yx; 11096 if (N.z > 0.0) { 11097 uv.x = 1.0 - uv.x; 11098 } 11099 color3 = texture(ima, uv); 11100 } 11101 11102 void tex_box_sample_nearest( 11103 vec3 texco, vec3 N, sampler2D ima, out vec4 color1, out vec4 color2, out vec4 color3) 11104 { 11105 /* X projection */ 11106 vec2 uv = texco.yz; 11107 if (N.x < 0.0) { 11108 uv.x = 1.0 - uv.x; 11109 } 11110 ivec2 pix = ivec2(uv.xy * textureSize(ima, 0).xy); 11111 color1 = texelFetch(ima, pix, 0); 11112 /* Y projection */ 11113 uv = texco.xz; 11114 if (N.y > 0.0) { 11115 uv.x = 1.0 - uv.x; 11116 } 11117 pix = ivec2(uv.xy * textureSize(ima, 0).xy); 11118 color2 = texelFetch(ima, pix, 0); 11119 /* Z projection */ 11120 uv = texco.yx; 11121 if (N.z > 0.0) { 11122 uv.x = 1.0 - uv.x; 11123 } 11124 pix = ivec2(uv.xy * textureSize(ima, 0).xy); 11125 color3 = texelFetch(ima, pix, 0); 11126 } 11127 11128 void tex_box_sample_cubic( 11129 vec3 texco, vec3 N, sampler2D ima, out vec4 color1, out vec4 color2, out vec4 color3) 11130 { 11131 float alpha; 11132 /* X projection */ 11133 vec2 uv = texco.yz; 11134 if (N.x < 0.0) { 11135 uv.x = 1.0 - uv.x; 11136 } 11137 node_tex_image_cubic_ex(uv.xyy, ima, 0.0, color1, alpha); 11138 /* Y projection */ 11139 uv = texco.xz; 11140 if (N.y > 0.0) { 11141 uv.x = 1.0 - uv.x; 11142 } 11143 node_tex_image_cubic_ex(uv.xyy, ima, 0.0, color2, alpha); 11144 /* Z projection */ 11145 uv = texco.yx; 11146 if (N.z > 0.0) { 11147 uv.x = 1.0 - uv.x; 11148 } 11149 node_tex_image_cubic_ex(uv.xyy, ima, 0.0, color3, alpha); 11150 } 11151 11152 void tex_box_sample_smart( 11153 vec3 texco, vec3 N, sampler2D ima, out vec4 color1, out vec4 color2, out vec4 color3) 11154 { 11155 tex_box_sample_cubic(texco, N, ima, color1, color2, color3); 11156 } 11157 11158 void node_tex_image_box(vec3 texco, 11159 vec3 N, 11160 vec4 color1, 11161 vec4 color2, 11162 vec4 color3, 11163 sampler2D ima, 11164 float blend, 11165 out vec4 color, 11166 out float alpha) 11167 { 11168 /* project from direction vector to barycentric coordinates in triangles */ 11169 N = abs(N); 11170 N /= dot(N, vec3(1.0)); 11171 11172 /* basic idea is to think of this as a triangle, each corner representing 11173 * one of the 3 faces of the cube. in the corners we have single textures, 11174 * in between we blend between two textures, and in the middle we a blend 11175 * between three textures. 11176 * 11177 * the Nxyz values are the barycentric coordinates in an equilateral 11178 * triangle, which in case of blending, in the middle has a smaller 11179 * equilateral triangle where 3 textures blend. this divides things into 11180 * 7 zones, with an if () test for each zone 11181 * EDIT: Now there is only 4 if's. */ 11182 11183 float limit = 0.5 + 0.5 * blend; 11184 11185 vec3 weight; 11186 weight = N.xyz / (N.xyx + N.yzz); 11187 weight = clamp((weight - 0.5 * (1.0 - blend)) / max(1e-8, blend), 0.0, 1.0); 11188 11189 /* test for mixes between two textures */ 11190 if (N.z < (1.0 - limit) * (N.y + N.x)) { 11191 weight.z = 0.0; 11192 weight.y = 1.0 - weight.x; 11193 } 11194 else if (N.x < (1.0 - limit) * (N.y + N.z)) { 11195 weight.x = 0.0; 11196 weight.z = 1.0 - weight.y; 11197 } 11198 else if (N.y < (1.0 - limit) * (N.x + N.z)) { 11199 weight.y = 0.0; 11200 weight.x = 1.0 - weight.z; 11201 } 11202 else { 11203 /* last case, we have a mix between three */ 11204 weight = ((2.0 - limit) * N + (limit - 1.0)) / max(1e-8, blend); 11205 } 11206 11207 color = weight.x * color1 + weight.y * color2 + weight.z * color3; 11208 alpha = color.a; 11209 } 11210 11211 void tex_clip_linear(vec3 co, sampler2D ima, vec4 icolor, out vec4 color, out float alpha) 11212 { 11213 vec2 tex_size = vec2(textureSize(ima, 0).xy); 11214 vec2 minco = min(co.xy, 1.0 - co.xy); 11215 minco = clamp(minco * tex_size + 0.5, 0.0, 1.0); 11216 float fac = minco.x * minco.y; 11217 11218 color = mix(vec4(0.0), icolor, fac); 11219 alpha = color.a; 11220 } 11221 11222 void tex_clip_nearest(vec3 co, sampler2D ima, vec4 icolor, out vec4 color, out float alpha) 11223 { 11224 vec4 minco = vec4(co.xy, 1.0 - co.xy); 11225 color = (any(lessThan(minco, vec4(0.0)))) ? vec4(0.0) : icolor; 11226 alpha = color.a; 11227 } 11228 11229 void tex_clip_cubic(vec3 co, sampler2D ima, vec4 icolor, out vec4 color, out float alpha) 11230 { 11231 vec2 tex_size = vec2(textureSize(ima, 0).xy); 11232 11233 co.xy *= tex_size; 11234 /* texel center */ 11235 vec2 tc = floor(co.xy - 0.5) + 0.5; 11236 vec2 w0, w1, w2, w3; 11237 cubic_bspline_coefs(co.xy - tc, w0, w1, w2, w3); 11238 11239 /* TODO Optimize this part. I'm sure there is a smarter way to do that. 11240 * Could do that when sampling? */ 11241 #define CLIP_CUBIC_SAMPLE(samp, size) \ 11242 (float(all(greaterThan(samp, vec2(-0.5)))) * float(all(lessThan(ivec2(samp), itex_size)))) 11243 ivec2 itex_size = textureSize(ima, 0).xy; 11244 float fac; 11245 fac = CLIP_CUBIC_SAMPLE(tc + vec2(-1.0, -1.0), itex_size) * w0.x * w0.y; 11246 fac += CLIP_CUBIC_SAMPLE(tc + vec2(0.0, -1.0), itex_size) * w1.x * w0.y; 11247 fac += CLIP_CUBIC_SAMPLE(tc + vec2(1.0, -1.0), itex_size) * w2.x * w0.y; 11248 fac += CLIP_CUBIC_SAMPLE(tc + vec2(2.0, -1.0), itex_size) * w3.x * w0.y; 11249 11250 fac += CLIP_CUBIC_SAMPLE(tc + vec2(-1.0, 0.0), itex_size) * w0.x * w1.y; 11251 fac += CLIP_CUBIC_SAMPLE(tc + vec2(0.0, 0.0), itex_size) * w1.x * w1.y; 11252 fac += CLIP_CUBIC_SAMPLE(tc + vec2(1.0, 0.0), itex_size) * w2.x * w1.y; 11253 fac += CLIP_CUBIC_SAMPLE(tc + vec2(2.0, 0.0), itex_size) * w3.x * w1.y; 11254 11255 fac += CLIP_CUBIC_SAMPLE(tc + vec2(-1.0, 1.0), itex_size) * w0.x * w2.y; 11256 fac += CLIP_CUBIC_SAMPLE(tc + vec2(0.0, 1.0), itex_size) * w1.x * w2.y; 11257 fac += CLIP_CUBIC_SAMPLE(tc + vec2(1.0, 1.0), itex_size) * w2.x * w2.y; 11258 fac += CLIP_CUBIC_SAMPLE(tc + vec2(2.0, 1.0), itex_size) * w3.x * w2.y; 11259 11260 fac += CLIP_CUBIC_SAMPLE(tc + vec2(-1.0, 2.0), itex_size) * w0.x * w3.y; 11261 fac += CLIP_CUBIC_SAMPLE(tc + vec2(0.0, 2.0), itex_size) * w1.x * w3.y; 11262 fac += CLIP_CUBIC_SAMPLE(tc + vec2(1.0, 2.0), itex_size) * w2.x * w3.y; 11263 fac += CLIP_CUBIC_SAMPLE(tc + vec2(2.0, 2.0), itex_size) * w3.x * w3.y; 11264 #undef CLIP_CUBIC_SAMPLE 11265 11266 color = mix(vec4(0.0), icolor, fac); 11267 alpha = color.a; 11268 } 11269 11270 void tex_clip_smart(vec3 co, sampler2D ima, vec4 icolor, out vec4 color, out float alpha) 11271 { 11272 tex_clip_cubic(co, ima, icolor, color, alpha); 11273 } 11274 11275 void node_tex_image_empty(vec3 co, out vec4 color, out float alpha) 11276 { 11277 color = vec4(0.0); 11278 alpha = 0.0; 11279 } 11280 11281 void node_tex_magic( 11282 vec3 co, float scale, float distortion, float depth, out vec4 color, out float fac) 11283 { 11284 vec3 p = co * scale; 11285 float x = sin((p.x + p.y + p.z) * 5.0); 11286 float y = cos((-p.x + p.y - p.z) * 5.0); 11287 float z = -cos((-p.x - p.y + p.z) * 5.0); 11288 11289 if (depth > 0) { 11290 x *= distortion; 11291 y *= distortion; 11292 z *= distortion; 11293 y = -cos(x - y + z); 11294 y *= distortion; 11295 if (depth > 1) { 11296 x = cos(x - y - z); 11297 x *= distortion; 11298 if (depth > 2) { 11299 z = sin(-x - y - z); 11300 z *= distortion; 11301 if (depth > 3) { 11302 x = -cos(-x + y - z); 11303 x *= distortion; 11304 if (depth > 4) { 11305 y = -sin(-x + y + z); 11306 y *= distortion; 11307 if (depth > 5) { 11308 y = -cos(-x + y + z); 11309 y *= distortion; 11310 if (depth > 6) { 11311 x = cos(x + y + z); 11312 x *= distortion; 11313 if (depth > 7) { 11314 z = sin(x + y - z); 11315 z *= distortion; 11316 if (depth > 8) { 11317 x = -cos(-x - y + z); 11318 x *= distortion; 11319 if (depth > 9) { 11320 y = -sin(x - y + z); 11321 y *= distortion; 11322 } 11323 } 11324 } 11325 } 11326 } 11327 } 11328 } 11329 } 11330 } 11331 } 11332 if (distortion != 0.0) { 11333 distortion *= 2.0; 11334 x /= distortion; 11335 y /= distortion; 11336 z /= distortion; 11337 } 11338 11339 color = vec4(0.5 - x, 0.5 - y, 0.5 - z, 1.0); 11340 fac = (color.x + color.y + color.z) / 3.0; 11341 } 11342 11343 float noise_fade(float t) 11344 { 11345 return t * t * t * (t * (t * 6.0 - 15.0) + 10.0); 11346 } 11347 11348 float noise_scale3(float result) 11349 { 11350 return 0.9820 * result; 11351 } 11352 11353 float noise_nerp(float t, float a, float b) 11354 { 11355 return (1.0 - t) * a + t * b; 11356 } 11357 11358 float noise_grad(uint hash, float x, float y, float z) 11359 { 11360 uint h = hash & 15u; 11361 float u = h < 8u ? x : y; 11362 float vt = ((h == 12u) || (h == 14u)) ? x : z; 11363 float v = h < 4u ? y : vt; 11364 return (((h & 1u) != 0u) ? -u : u) + (((h & 2u) != 0u) ? -v : v); 11365 } 11366 11367 float noise_perlin(float x, float y, float z) 11368 { 11369 int X; 11370 float fx = floorfrac(x, X); 11371 int Y; 11372 float fy = floorfrac(y, Y); 11373 int Z; 11374 float fz = floorfrac(z, Z); 11375 11376 float u = noise_fade(fx); 11377 float v = noise_fade(fy); 11378 float w = noise_fade(fz); 11379 11380 float noise_u[2], noise_v[2]; 11381 11382 noise_u[0] = noise_nerp( 11383 u, noise_grad(hash(X, Y, Z), fx, fy, fz), noise_grad(hash(X + 1, Y, Z), fx - 1.0, fy, fz)); 11384 11385 noise_u[1] = noise_nerp(u, 11386 noise_grad(hash(X, Y + 1, Z), fx, fy - 1.0, fz), 11387 noise_grad(hash(X + 1, Y + 1, Z), fx - 1.0, fy - 1.0, fz)); 11388 11389 noise_v[0] = noise_nerp(v, noise_u[0], noise_u[1]); 11390 11391 noise_u[0] = noise_nerp(u, 11392 noise_grad(hash(X, Y, Z + 1), fx, fy, fz - 1.0), 11393 noise_grad(hash(X + 1, Y, Z + 1), fx - 1.0, fy, fz - 1.0)); 11394 11395 noise_u[1] = noise_nerp(u, 11396 noise_grad(hash(X, Y + 1, Z + 1), fx, fy - 1.0, fz - 1.0), 11397 noise_grad(hash(X + 1, Y + 1, Z + 1), fx - 1.0, fy - 1.0, fz - 1.0)); 11398 11399 noise_v[1] = noise_nerp(v, noise_u[0], noise_u[1]); 11400 11401 return noise_scale3(noise_nerp(w, noise_v[0], noise_v[1])); 11402 } 11403 11404 float noise(vec3 p) 11405 { 11406 return 0.5 * noise_perlin(p.x, p.y, p.z) + 0.5; 11407 } 11408 11409 float snoise(vec3 p) 11410 { 11411 return noise_perlin(p.x, p.y, p.z); 11412 } 11413 11414 float noise_turbulence(vec3 p, float octaves, int hard) 11415 { 11416 float fscale = 1.0; 11417 float amp = 1.0; 11418 float sum = 0.0; 11419 octaves = clamp(octaves, 0.0, 16.0); 11420 int n = int(octaves); 11421 for (int i = 0; i <= n; i++) { 11422 float t = noise(fscale * p); 11423 if (hard != 0) { 11424 t = abs(2.0 * t - 1.0); 11425 } 11426 sum += t * amp; 11427 amp *= 0.5; 11428 fscale *= 2.0; 11429 } 11430 float rmd = octaves - floor(octaves); 11431 if (rmd != 0.0) { 11432 float t = noise(fscale * p); 11433 if (hard != 0) { 11434 t = abs(2.0 * t - 1.0); 11435 } 11436 float sum2 = sum + t * amp; 11437 sum *= (float(1 << n) / float((1 << (n + 1)) - 1)); 11438 sum2 *= (float(1 << (n + 1)) / float((1 << (n + 2)) - 1)); 11439 return (1.0 - rmd) * sum + rmd * sum2; 11440 } 11441 else { 11442 sum *= (float(1 << n) / float((1 << (n + 1)) - 1)); 11443 return sum; 11444 } 11445 } 11446 11447 void node_tex_noise( 11448 vec3 co, float scale, float detail, float distortion, out vec4 color, out float fac) 11449 { 11450 vec3 p = co * scale; 11451 int hard = 0; 11452 if (distortion != 0.0) { 11453 vec3 r, offset = vec3(13.5, 13.5, 13.5); 11454 r.x = noise(p + offset) * distortion; 11455 r.y = noise(p) * distortion; 11456 r.z = noise(p - offset) * distortion; 11457 p += r; 11458 } 11459 11460 fac = noise_turbulence(p, detail, hard); 11461 color = vec4(fac, 11462 noise_turbulence(vec3(p.y, p.x, p.z), detail, hard), 11463 noise_turbulence(vec3(p.y, p.z, p.x), detail, hard), 11464 1); 11465 } 11466 11467 /* Musgrave fBm 11468 * 11469 * H: fractal increment parameter 11470 * lacunarity: gap between successive frequencies 11471 * octaves: number of frequencies in the fBm 11472 * 11473 * from "Texturing and Modelling: A procedural approach" 11474 */ 11475 11476 float noise_musgrave_fBm(vec3 p, float H, float lacunarity, float octaves) 11477 { 11478 float rmd; 11479 float value = 0.0; 11480 float pwr = 1.0; 11481 float pwHL = pow(lacunarity, -H); 11482 11483 for (int i = 0; i < int(octaves); i++) { 11484 value += snoise(p) * pwr; 11485 pwr *= pwHL; 11486 p *= lacunarity; 11487 } 11488 11489 rmd = octaves - floor(octaves); 11490 if (rmd != 0.0) 11491 value += rmd * snoise(p) * pwr; 11492 11493 return value; 11494 } 11495 11496 /* Musgrave Multifractal 11497 * 11498 * H: highest fractal dimension 11499 * lacunarity: gap between successive frequencies 11500 * octaves: number of frequencies in the fBm 11501 */ 11502 11503 float noise_musgrave_multi_fractal(vec3 p, float H, float lacunarity, float octaves) 11504 { 11505 float rmd; 11506 float value = 1.0; 11507 float pwr = 1.0; 11508 float pwHL = pow(lacunarity, -H); 11509 11510 for (int i = 0; i < int(octaves); i++) { 11511 value *= (pwr * snoise(p) + 1.0); 11512 pwr *= pwHL; 11513 p *= lacunarity; 11514 } 11515 11516 rmd = octaves - floor(octaves); 11517 if (rmd != 0.0) 11518 value *= (rmd * pwr * snoise(p) + 1.0); /* correct? */ 11519 11520 return value; 11521 } 11522 11523 /* Musgrave Heterogeneous Terrain 11524 * 11525 * H: fractal dimension of the roughest area 11526 * lacunarity: gap between successive frequencies 11527 * octaves: number of frequencies in the fBm 11528 * offset: raises the terrain from `sea level' 11529 */ 11530 11531 float noise_musgrave_hetero_terrain(vec3 p, float H, float lacunarity, float octaves, float offset) 11532 { 11533 float value, increment, rmd; 11534 float pwHL = pow(lacunarity, -H); 11535 float pwr = pwHL; 11536 11537 /* first unscaled octave of function; later octaves are scaled */ 11538 value = offset + snoise(p); 11539 p *= lacunarity; 11540 11541 for (int i = 1; i < int(octaves); i++) { 11542 increment = (snoise(p) + offset) * pwr * value; 11543 value += increment; 11544 pwr *= pwHL; 11545 p *= lacunarity; 11546 } 11547 11548 rmd = octaves - floor(octaves); 11549 if (rmd != 0.0) { 11550 increment = (snoise(p) + offset) * pwr * value; 11551 value += rmd * increment; 11552 } 11553 11554 return value; 11555 } 11556 11557 /* Hybrid Additive/Multiplicative Multifractal Terrain 11558 * 11559 * H: fractal dimension of the roughest area 11560 * lacunarity: gap between successive frequencies 11561 * octaves: number of frequencies in the fBm 11562 * offset: raises the terrain from `sea level' 11563 */ 11564 11565 float noise_musgrave_hybrid_multi_fractal( 11566 vec3 p, float H, float lacunarity, float octaves, float offset, float gain) 11567 { 11568 float result, signal, weight, rmd; 11569 float pwHL = pow(lacunarity, -H); 11570 float pwr = pwHL; 11571 11572 result = snoise(p) + offset; 11573 weight = gain * result; 11574 p *= lacunarity; 11575 11576 for (int i = 1; (weight > 0.001f) && (i < int(octaves)); i++) { 11577 if (weight > 1.0) 11578 weight = 1.0; 11579 11580 signal = (snoise(p) + offset) * pwr; 11581 pwr *= pwHL; 11582 result += weight * signal; 11583 weight *= gain * signal; 11584 p *= lacunarity; 11585 } 11586 11587 rmd = octaves - floor(octaves); 11588 if (rmd != 0.0) 11589 result += rmd * ((snoise(p) + offset) * pwr); 11590 11591 return result; 11592 } 11593 11594 /* Ridged Multifractal Terrain 11595 * 11596 * H: fractal dimension of the roughest area 11597 * lacunarity: gap between successive frequencies 11598 * octaves: number of frequencies in the fBm 11599 * offset: raises the terrain from `sea level' 11600 */ 11601 11602 float noise_musgrave_ridged_multi_fractal( 11603 vec3 p, float H, float lacunarity, float octaves, float offset, float gain) 11604 { 11605 float result, signal, weight; 11606 float pwHL = pow(lacunarity, -H); 11607 float pwr = pwHL; 11608 11609 signal = offset - abs(snoise(p)); 11610 signal *= signal; 11611 result = signal; 11612 weight = 1.0; 11613 11614 for (int i = 1; i < int(octaves); i++) { 11615 p *= lacunarity; 11616 weight = clamp(signal * gain, 0.0, 1.0); 11617 signal = offset - abs(snoise(p)); 11618 signal *= signal; 11619 signal *= weight; 11620 result += signal * pwr; 11621 pwr *= pwHL; 11622 } 11623 11624 return result; 11625 } 11626 11627 float svm_musgrave(int type, 11628 float dimension, 11629 float lacunarity, 11630 float octaves, 11631 float offset, 11632 float intensity, 11633 float gain, 11634 vec3 p) 11635 { 11636 if (type == 0 /* NODE_MUSGRAVE_MULTIFRACTAL */) 11637 return intensity * noise_musgrave_multi_fractal(p, dimension, lacunarity, octaves); 11638 else if (type == 1 /* NODE_MUSGRAVE_FBM */) 11639 return intensity * noise_musgrave_fBm(p, dimension, lacunarity, octaves); 11640 else if (type == 2 /* NODE_MUSGRAVE_HYBRID_MULTIFRACTAL */) 11641 return intensity * 11642 noise_musgrave_hybrid_multi_fractal(p, dimension, lacunarity, octaves, offset, gain); 11643 else if (type == 3 /* NODE_MUSGRAVE_RIDGED_MULTIFRACTAL */) 11644 return intensity * 11645 noise_musgrave_ridged_multi_fractal(p, dimension, lacunarity, octaves, offset, gain); 11646 else if (type == 4 /* NODE_MUSGRAVE_HETERO_TERRAIN */) 11647 return intensity * noise_musgrave_hetero_terrain(p, dimension, lacunarity, octaves, offset); 11648 return 0.0; 11649 } 11650 11651 void node_tex_musgrave(vec3 co, 11652 float scale, 11653 float detail, 11654 float dimension, 11655 float lacunarity, 11656 float offset, 11657 float gain, 11658 float type, 11659 out vec4 color, 11660 out float fac) 11661 { 11662 fac = svm_musgrave(int(type), dimension, lacunarity, detail, offset, 1.0, gain, co *scale); 11663 11664 color = vec4(fac, fac, fac, 1.0); 11665 } 11666 11667 void node_tex_sky(vec3 co, out vec4 color) 11668 { 11669 color = vec4(1.0); 11670 } 11671 11672 void node_tex_voronoi(vec3 co, 11673 float scale, 11674 float exponent, 11675 float coloring, 11676 float metric, 11677 float feature, 11678 out vec4 color, 11679 out float fac) 11680 { 11681 vec3 p = co * scale; 11682 int xx, yy, zz, xi, yi, zi; 11683 vec4 da = vec4(1e10); 11684 vec3 pa[4] = vec3[4](vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0)); 11685 11686 xi = floor_to_int(p[0]); 11687 yi = floor_to_int(p[1]); 11688 zi = floor_to_int(p[2]); 11689 11690 for (xx = xi - 1; xx <= xi + 1; xx++) { 11691 for (yy = yi - 1; yy <= yi + 1; yy++) { 11692 for (zz = zi - 1; zz <= zi + 1; zz++) { 11693 vec3 ip = vec3(xx, yy, zz); 11694 vec3 vp = cellnoise_color(ip); 11695 vec3 pd = p - (vp + ip); 11696 11697 float d = 0.0; 11698 if (metric == 0.0) { /* SHD_VORONOI_DISTANCE 0 */ 11699 d = dot(pd, pd); 11700 } 11701 else if (metric == 1.0) { /* SHD_VORONOI_MANHATTAN 1 */ 11702 d = abs(pd[0]) + abs(pd[1]) + abs(pd[2]); 11703 } 11704 else if (metric == 2.0) { /* SHD_VORONOI_CHEBYCHEV 2 */ 11705 d = max(abs(pd[0]), max(abs(pd[1]), abs(pd[2]))); 11706 } 11707 else if (metric == 3.0) { /* SHD_VORONOI_MINKOWSKI 3 */ 11708 d = pow(pow(abs(pd[0]), exponent) + pow(abs(pd[1]), exponent) + 11709 pow(abs(pd[2]), exponent), 11710 1.0 / exponent); 11711 } 11712 11713 vp += vec3(xx, yy, zz); 11714 if (d < da[0]) { 11715 da.yzw = da.xyz; 11716 da[0] = d; 11717 11718 pa[3] = pa[2]; 11719 pa[2] = pa[1]; 11720 pa[1] = pa[0]; 11721 pa[0] = vp; 11722 } 11723 else if (d < da[1]) { 11724 da.zw = da.yz; 11725 da[1] = d; 11726 11727 pa[3] = pa[2]; 11728 pa[2] = pa[1]; 11729 pa[1] = vp; 11730 } 11731 else if (d < da[2]) { 11732 da[3] = da[2]; 11733 da[2] = d; 11734 11735 pa[3] = pa[2]; 11736 pa[2] = vp; 11737 } 11738 else if (d < da[3]) { 11739 da[3] = d; 11740 pa[3] = vp; 11741 } 11742 } 11743 } 11744 } 11745 11746 if (coloring == 0.0) { 11747 /* Intensity output */ 11748 if (feature == 0.0) { /* F1 */ 11749 fac = abs(da[0]); 11750 } 11751 else if (feature == 1.0) { /* F2 */ 11752 fac = abs(da[1]); 11753 } 11754 else if (feature == 2.0) { /* F3 */ 11755 fac = abs(da[2]); 11756 } 11757 else if (feature == 3.0) { /* F4 */ 11758 fac = abs(da[3]); 11759 } 11760 else if (feature == 4.0) { /* F2F1 */ 11761 fac = abs(da[1] - da[0]); 11762 } 11763 color = vec4(fac, fac, fac, 1.0); 11764 } 11765 else { 11766 /* Color output */ 11767 vec3 col = vec3(fac, fac, fac); 11768 if (feature == 0.0) { /* F1 */ 11769 col = pa[0]; 11770 } 11771 else if (feature == 1.0) { /* F2 */ 11772 col = pa[1]; 11773 } 11774 else if (feature == 2.0) { /* F3 */ 11775 col = pa[2]; 11776 } 11777 else if (feature == 3.0) { /* F4 */ 11778 col = pa[3]; 11779 } 11780 else if (feature == 4.0) { /* F2F1 */ 11781 col = abs(pa[1] - pa[0]); 11782 } 11783 11784 color = vec4(cellnoise_color(col), 1.0); 11785 fac = (color.x + color.y + color.z) * (1.0 / 3.0); 11786 } 11787 } 11788 11789 float calc_wave( 11790 vec3 p, float distortion, float detail, float detail_scale, int wave_type, int wave_profile) 11791 { 11792 float n; 11793 11794 if (wave_type == 0) /* type bands */ 11795 n = (p.x + p.y + p.z) * 10.0; 11796 else /* type rings */ 11797 n = length(p) * 20.0; 11798 11799 if (distortion != 0.0) 11800 n += distortion * noise_turbulence(p * detail_scale, detail, 0); 11801 11802 if (wave_profile == 0) { /* profile sin */ 11803 return 0.5 + 0.5 * sin(n); 11804 } 11805 else { /* profile saw */ 11806 n /= 2.0 * M_PI; 11807 n -= int(n); 11808 return (n < 0.0) ? n + 1.0 : n; 11809 } 11810 } 11811 11812 void node_tex_wave(vec3 co, 11813 float scale, 11814 float distortion, 11815 float detail, 11816 float detail_scale, 11817 float wave_type, 11818 float wave_profile, 11819 out vec4 color, 11820 out float fac) 11821 { 11822 float f; 11823 f = calc_wave(co * scale, distortion, detail, detail_scale, int(wave_type), int(wave_profile)); 11824 11825 color = vec4(f, f, f, 1.0); 11826 fac = f; 11827 } 11828 11829 /* light path */ 11830 11831 void node_light_path(out float is_camera_ray, 11832 out float is_shadow_ray, 11833 out float is_diffuse_ray, 11834 out float is_glossy_ray, 11835 out float is_singular_ray, 11836 out float is_reflection_ray, 11837 out float is_transmission_ray, 11838 out float ray_length, 11839 out float ray_depth, 11840 out float diffuse_depth, 11841 out float glossy_depth, 11842 out float transparent_depth, 11843 out float transmission_depth) 11844 { 11845 /* Supported. */ 11846 is_camera_ray = (rayType == EEVEE_RAY_CAMERA) ? 1.0 : 0.0; 11847 is_shadow_ray = (rayType == EEVEE_RAY_SHADOW) ? 1.0 : 0.0; 11848 is_diffuse_ray = (rayType == EEVEE_RAY_DIFFUSE) ? 1.0 : 0.0; 11849 is_glossy_ray = (rayType == EEVEE_RAY_GLOSSY) ? 1.0 : 0.0; 11850 /* Kind of supported. */ 11851 is_singular_ray = is_glossy_ray; 11852 is_reflection_ray = is_glossy_ray; 11853 is_transmission_ray = is_glossy_ray; 11854 ray_depth = rayDepth; 11855 diffuse_depth = (is_diffuse_ray == 1.0) ? rayDepth : 0.0; 11856 glossy_depth = (is_glossy_ray == 1.0) ? rayDepth : 0.0; 11857 transmission_depth = (is_transmission_ray == 1.0) ? glossy_depth : 0.0; 11858 /* Not supported. */ 11859 ray_length = 1.0; 11860 transparent_depth = 0.0; 11861 } 11862 11863 void node_light_falloff( 11864 float strength, float tsmooth, out float quadratic, out float linear, out float constant) 11865 { 11866 quadratic = strength; 11867 linear = strength; 11868 constant = strength; 11869 } 11870 11871 void node_object_info(mat4 obmat, 11872 vec4 info, 11873 out vec3 location, 11874 out float object_index, 11875 out float material_index, 11876 out float random) 11877 { 11878 location = obmat[3].xyz; 11879 object_index = info.x; 11880 material_index = info.y; 11881 random = info.z; 11882 } 11883 11884 void node_normal_map(vec4 info, vec4 tangent, vec3 normal, vec3 texnormal, out vec3 outnormal) 11885 { 11886 if (all(equal(tangent, vec4(0.0, 0.0, 0.0, 1.0)))) { 11887 outnormal = normal; 11888 return; 11889 } 11890 tangent *= (gl_FrontFacing ? 1.0 : -1.0); 11891 vec3 B = tangent.w * cross(normal, tangent.xyz) * info.w; 11892 11893 outnormal = texnormal.x * tangent.xyz + texnormal.y * B + texnormal.z * normal; 11894 outnormal = normalize(outnormal); 11895 } 11896 11897 void node_bump( 11898 float strength, float dist, float height, vec3 N, vec3 surf_pos, float invert, out vec3 result) 11899 { 11900 N = mat3(ViewMatrix) * normalize(N); 11901 dist *= invert; 11902 11903 vec3 dPdx = dFdx(surf_pos); 11904 vec3 dPdy = dFdy(surf_pos); 11905 11906 /* Get surface tangents from normal. */ 11907 vec3 Rx = cross(dPdy, N); 11908 vec3 Ry = cross(N, dPdx); 11909 11910 /* Compute surface gradient and determinant. */ 11911 float det = dot(dPdx, Rx); 11912 11913 float dHdx = dFdx(height); 11914 float dHdy = dFdy(height); 11915 vec3 surfgrad = dHdx * Rx + dHdy * Ry; 11916 11917 strength = max(strength, 0.0); 11918 11919 result = normalize(abs(det) * N - dist * sign(det) * surfgrad); 11920 result = normalize(mix(N, result, strength)); 11921 11922 result = mat3(ViewMatrixInverse) * result; 11923 } 11924 11925 void node_bevel(float radius, vec3 N, out vec3 result) 11926 { 11927 result = N; 11928 } 11929 11930 void node_hair_info(out float is_strand, 11931 out float intercept, 11932 out float thickness, 11933 out vec3 tangent, 11934 out float random) 11935 { 11936 #ifdef HAIR_SHADER 11937 is_strand = 1.0; 11938 intercept = hairTime; 11939 thickness = hairThickness; 11940 tangent = normalize(hairTangent); 11941 random = wang_hash_noise( 11942 uint(hairStrandID)); /* TODO: could be precomputed per strand instead. */ 11943 #else 11944 is_strand = 0.0; 11945 intercept = 0.0; 11946 thickness = 0.0; 11947 tangent = vec3(1.0); 11948 random = 0.0; 11949 #endif 11950 } 11951 11952 void node_displacement_object( 11953 float height, float midlevel, float scale, vec3 N, mat4 obmat, out vec3 result) 11954 { 11955 N = (vec4(N, 0.0) * obmat).xyz; 11956 result = (height - midlevel) * scale * normalize(N); 11957 result = (obmat * vec4(result, 0.0)).xyz; 11958 } 11959 11960 void node_displacement_world(float height, float midlevel, float scale, vec3 N, out vec3 result) 11961 { 11962 result = (height - midlevel) * scale * normalize(N); 11963 } 11964 11965 void node_vector_displacement_tangent(vec4 vector, 11966 float midlevel, 11967 float scale, 11968 vec4 tangent, 11969 vec3 normal, 11970 mat4 obmat, 11971 mat4 viewmat, 11972 out vec3 result) 11973 { 11974 vec3 N_object = normalize(((vec4(normal, 0.0) * viewmat) * obmat).xyz); 11975 vec3 T_object = normalize(((vec4(tangent.xyz, 0.0) * viewmat) * obmat).xyz); 11976 vec3 B_object = tangent.w * normalize(cross(N_object, T_object)); 11977 11978 vec3 offset = (vector.xyz - vec3(midlevel)) * scale; 11979 result = offset.x * T_object + offset.y * N_object + offset.z * B_object; 11980 result = (obmat * vec4(result, 0.0)).xyz; 11981 } 11982 11983 void node_vector_displacement_object( 11984 vec4 vector, float midlevel, float scale, mat4 obmat, out vec3 result) 11985 { 11986 result = (vector.xyz - vec3(midlevel)) * scale; 11987 result = (obmat * vec4(result, 0.0)).xyz; 11988 } 11989 11990 void node_vector_displacement_world(vec4 vector, float midlevel, float scale, out vec3 result) 11991 { 11992 result = (vector.xyz - vec3(midlevel)) * scale; 11993 } 11994 11995 /* output */ 11996 11997 void node_output_material(Closure surface, Closure volume, vec3 displacement, out Closure result) 11998 { 11999 #ifdef VOLUMETRICS 12000 result = volume; 12001 #else 12002 result = surface; 12003 #endif 12004 } 12005 12006 uniform float backgroundAlpha; 12007 12008 void node_output_world(Closure surface, Closure volume, out Closure result) 12009 { 12010 #ifndef VOLUMETRICS 12011 result.radiance = surface.radiance * backgroundAlpha; 12012 result.opacity = backgroundAlpha; 12013 #else 12014 result = volume; 12015 #endif /* VOLUMETRICS */ 12016 } 12017 12018 #ifndef VOLUMETRICS 12019 /* TODO : clean this ifdef mess */ 12020 /* EEVEE output */ 12021 void world_normals_get(out vec3 N) 12022 { 12023 # ifdef HAIR_SHADER 12024 vec3 B = normalize(cross(worldNormal, hairTangent)); 12025 float cos_theta; 12026 if (hairThicknessRes == 1) { 12027 vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); 12028 /* Random cosine normal distribution on the hair surface. */ 12029 cos_theta = rand.x * 2.0 - 1.0; 12030 } 12031 else { 12032 /* Shade as a cylinder. */ 12033 cos_theta = hairThickTime / hairThickness; 12034 } 12035 float sin_theta = sqrt(max(0.0, 1.0f - cos_theta * cos_theta)); 12036 N = normalize(worldNormal * sin_theta + B * cos_theta); 12037 # else 12038 N = gl_FrontFacing ? worldNormal : -worldNormal; 12039 # endif 12040 } 12041 12042 void node_eevee_specular(vec4 diffuse, 12043 vec4 specular, 12044 float roughness, 12045 vec4 emissive, 12046 float transp, 12047 vec3 normal, 12048 float clearcoat, 12049 float clearcoat_roughness, 12050 vec3 clearcoat_normal, 12051 float occlusion, 12052 float ssr_id, 12053 out Closure result) 12054 { 12055 vec3 out_diff, out_spec, ssr_spec; 12056 eevee_closure_default(normal, 12057 diffuse.rgb, 12058 specular.rgb, 12059 int(ssr_id), 12060 roughness, 12061 occlusion, 12062 out_diff, 12063 out_spec, 12064 ssr_spec); 12065 12066 vec3 vN = normalize(mat3(ViewMatrix) * normal); 12067 result = CLOSURE_DEFAULT; 12068 result.radiance = out_diff * diffuse.rgb + out_spec + emissive.rgb; 12069 result.opacity = 1.0 - transp; 12070 result.ssr_data = vec4(ssr_spec, roughness); 12071 result.ssr_normal = normal_encode(vN, viewCameraVec); 12072 result.ssr_id = int(ssr_id); 12073 } 12074 12075 void node_shader_to_rgba(Closure cl, out vec4 outcol, out float outalpha) 12076 { 12077 vec4 spec_accum = vec4(0.0); 12078 if (ssrToggle && cl.ssr_id == outputSsrId) { 12079 vec3 V = cameraVec; 12080 vec3 vN = normal_decode(cl.ssr_normal, viewCameraVec); 12081 vec3 N = transform_direction(ViewMatrixInverse, vN); 12082 float roughness = cl.ssr_data.a; 12083 float roughnessSquared = max(1e-3, roughness * roughness); 12084 fallback_cubemap(N, V, worldPosition, viewPosition, roughness, roughnessSquared, spec_accum); 12085 } 12086 12087 outalpha = cl.opacity; 12088 outcol = vec4((spec_accum.rgb * cl.ssr_data.rgb) + cl.radiance, 1.0); 12089 12090 # ifdef USE_SSS 12091 # ifdef USE_SSS_ALBEDO 12092 outcol.rgb += cl.sss_data.rgb * cl.sss_albedo; 12093 # else 12094 outcol.rgb += cl.sss_data.rgb; 12095 # endif 12096 # endif 12097 } 12098 12099 #endif /* VOLUMETRICS */ 12100 Closure strct5 = CLOSURE_DEFAULT; 12101 12102 layout (std140) uniform nodeTree { 12103 vec4 unf1; 12104 float unf2; 12105 }; 12106 12107 Closure nodetree_exec(void) 12108 { 12109 Closure tmp3; 12110 Closure tmp6; 12111 12112 node_background(unf1, unf2, tmp3); 12113 node_output_world(tmp3, strct5, tmp6); 12114 12115 return tmp6; 12116 } 12117 #ifndef NODETREE_EXEC 12118 out vec4 fragColor; 12119 void main() 12120 { 12121 Closure cl = nodetree_exec(); 12122 fragColor = vec4(cl.radiance, cl.opacity); 12123 } 12124 #endif 12125 0(973) : error C0105: Syntax error in #if 0(973) : error C0105: Syntax error in #if 0(974) : error C0000: syntax error, unexpected '!' at token "!" GPUShader: compile error: ===== shader string 1 ==== 1 #version 330 ===== shader string 2 ==== 2 #define GPU_FRAGMENT_SHADER ===== shader string 3 ==== 3 #extension GL_ARB_texture_gather: enable 4 #define GPU_ARB_texture_gather 5 #extension GL_ARB_texture_query_lod: enable ===== shader string 4 ==== 6 #define GPU_NVIDIA 7 #define OS_WIN ===== shader string 5 ==== 8 9 layout(std140) uniform common_block 10 { 11 mat4 pastViewProjectionMatrix; 12 vec4 viewVecs[2]; 13 vec2 mipRatio[10]; /* To correct mip level texel mis-alignement */ 14 /* Ambient Occlusion */ 15 vec4 aoParameters[2]; 16 /* Volumetric */ 17 ivec4 volTexSize; 18 vec4 volDepthParameters; /* Parameters to the volume Z equation */ 19 vec4 volInvTexSize; 20 vec4 volJitter; 21 vec4 volCoordScale; /* To convert volume uvs to screen uvs */ 22 float volHistoryAlpha; 23 float volLightClamp; 24 float volShadowSteps; 25 bool volUseLights; 26 /* Screen Space Reflections */ 27 vec4 ssrParameters; 28 float ssrBorderFac; 29 float ssrMaxRoughness; 30 float ssrFireflyFac; 31 float ssrBrdfBias; 32 bool ssrToggle; 33 /* SubSurface Scattering */ 34 float sssJitterThreshold; 35 bool sssToggle; 36 /* Specular */ 37 bool specToggle; 38 /* Lights */ 39 int laNumLight; 40 /* Probes */ 41 int prbNumPlanar; 42 int prbNumRenderCube; 43 int prbNumRenderGrid; 44 int prbIrradianceVisSize; 45 float prbIrradianceSmooth; 46 float prbLodCubeMax; 47 float prbLodPlanarMax; 48 /* Misc*/ 49 int hizMipOffset; 50 int rayType; 51 float rayDepth; 52 }; 53 54 /* rayType (keep in sync with ray_type) */ 55 #define EEVEE_RAY_CAMERA 0 56 #define EEVEE_RAY_SHADOW 1 57 #define EEVEE_RAY_DIFFUSE 2 58 #define EEVEE_RAY_GLOSSY 3 59 60 /* aoParameters */ 61 #define aoDistance aoParameters[0].x 62 #define aoSamples aoParameters[0].y /* UNUSED */ 63 #define aoFactor aoParameters[0].z 64 #define aoInvSamples aoParameters[0].w /* UNUSED */ 65 66 #define aoOffset aoParameters[1].x /* UNUSED */ 67 #define aoBounceFac aoParameters[1].y 68 #define aoQuality aoParameters[1].z 69 #define aoSettings aoParameters[1].w 70 71 /* ssrParameters */ 72 #define ssrQuality ssrParameters.x 73 #define ssrThickness ssrParameters.y 74 #define ssrPixelSize ssrParameters.zw 75 /* keep in sync with DRWManager.view_data */ 76 layout(std140) uniform viewBlock 77 { 78 /* Same order as DRWViewportMatrixType */ 79 mat4 ViewProjectionMatrix; 80 mat4 ViewProjectionMatrixInverse; 81 mat4 ViewMatrix; 82 mat4 ViewMatrixInverse; 83 mat4 ProjectionMatrix; 84 mat4 ProjectionMatrixInverse; 85 86 vec4 CameraTexCoFactors; 87 88 vec4 clipPlanes[2]; 89 }; 90 91 #define M_PI 3.14159265358979323846 /* pi */ 92 #define M_2PI 6.28318530717958647692 /* 2*pi */ 93 #define M_PI_2 1.57079632679489661923 /* pi/2 */ 94 #define M_1_PI 0.318309886183790671538 /* 1/pi */ 95 #define M_1_2PI 0.159154943091895335768 /* 1/(2*pi) */ 96 #define M_1_PI2 0.101321183642337771443 /* 1/(pi^2) */ 97 98 #define LUT_SIZE 64 99 100 /* Buffers */ 101 uniform sampler2D colorBuffer; 102 uniform sampler2D depthBuffer; 103 uniform sampler2D maxzBuffer; 104 uniform sampler2D minzBuffer; 105 uniform sampler2DArray planarDepth; 106 107 #define cameraForward normalize(ViewMatrixInverse[2].xyz) 108 #define cameraPos ViewMatrixInverse[3].xyz 109 #define cameraVec \ 110 ((ProjectionMatrix[3][3] == 0.0) ? normalize(cameraPos - worldPosition) : cameraForward) 111 #define viewCameraVec \ 112 ((ProjectionMatrix[3][3] == 0.0) ? normalize(-viewPosition) : vec3(0.0, 0.0, 1.0)) 113 114 /* ------- Structures -------- */ 115 116 /* ------ Lights ----- */ 117 struct LightData { 118 vec4 position_influence; /* w : InfluenceRadius (inversed and squared) */ 119 vec4 color_spec; /* w : Spec Intensity */ 120 vec4 spotdata_radius_shadow; /* x : spot size, y : spot blend, z : radius, w: shadow id */ 121 vec4 rightvec_sizex; /* xyz: Normalized up vector, w: area size X or spot scale X */ 122 vec4 upvec_sizey; /* xyz: Normalized right vector, w: area size Y or spot scale Y */ 123 vec4 forwardvec_type; /* xyz: Normalized forward vector, w: Light Type */ 124 }; 125 126 /* convenience aliases */ 127 #define l_color color_spec.rgb 128 #define l_spec color_spec.a 129 #define l_position position_influence.xyz 130 #define l_influence position_influence.w 131 #define l_sizex rightvec_sizex.w 132 #define l_sizey upvec_sizey.w 133 #define l_right rightvec_sizex.xyz 134 #define l_up upvec_sizey.xyz 135 #define l_forward forwardvec_type.xyz 136 #define l_type forwardvec_type.w 137 #define l_spot_size spotdata_radius_shadow.x 138 #define l_spot_blend spotdata_radius_shadow.y 139 #define l_radius spotdata_radius_shadow.z 140 #define l_shadowid spotdata_radius_shadow.w 141 142 /* ------ Shadows ----- */ 143 #ifndef MAX_CASCADE_NUM 144 # define MAX_CASCADE_NUM 4 145 #endif 146 147 struct ShadowData { 148 vec4 near_far_bias_exp; 149 vec4 shadow_data_start_end; 150 vec4 contact_shadow_data; 151 }; 152 153 struct ShadowCubeData { 154 vec4 position; 155 }; 156 157 struct ShadowCascadeData { 158 mat4 shadowmat[MAX_CASCADE_NUM]; 159 vec4 split_start_distances; 160 vec4 split_end_distances; 161 }; 162 163 /* convenience aliases */ 164 #define sh_near near_far_bias_exp.x 165 #define sh_far near_far_bias_exp.y 166 #define sh_bias near_far_bias_exp.z 167 #define sh_exp near_far_bias_exp.w 168 #define sh_bleed near_far_bias_exp.w 169 #define sh_tex_start shadow_data_start_end.x 170 #define sh_data_start shadow_data_start_end.y 171 #define sh_multi_nbr shadow_data_start_end.z 172 #define sh_blur shadow_data_start_end.w 173 #define sh_contact_dist contact_shadow_data.x 174 #define sh_contact_offset contact_shadow_data.y 175 #define sh_contact_spread contact_shadow_data.z 176 #define sh_contact_thickness contact_shadow_data.w 177 178 /* ------- Convenience functions --------- */ 179 180 vec3 mul(mat3 m, vec3 v) 181 { 182 return m * v; 183 } 184 mat3 mul(mat3 m1, mat3 m2) 185 { 186 return m1 * m2; 187 } 188 vec3 transform_direction(mat4 m, vec3 v) 189 { 190 return mat3(m) * v; 191 } 192 vec3 transform_point(mat4 m, vec3 v) 193 { 194 return (m * vec4(v, 1.0)).xyz; 195 } 196 vec3 project_point(mat4 m, vec3 v) 197 { 198 vec4 tmp = m * vec4(v, 1.0); 199 return tmp.xyz / tmp.w; 200 } 201 202 #define min3(a, b, c) min(a, min(b, c)) 203 #define min4(a, b, c, d) min(a, min3(b, c, d)) 204 #define min5(a, b, c, d, e) min(a, min4(b, c, d, e)) 205 #define min6(a, b, c, d, e, f) min(a, min5(b, c, d, e, f)) 206 #define min7(a, b, c, d, e, f, g) min(a, min6(b, c, d, e, f, g)) 207 #define min8(a, b, c, d, e, f, g, h) min(a, min7(b, c, d, e, f, g, h)) 208 #define min9(a, b, c, d, e, f, g, h, i) min(a, min8(b, c, d, e, f, g, h, i)) 209 210 #define max3(a, b, c) max(a, max(b, c)) 211 #define max4(a, b, c, d) max(a, max3(b, c, d)) 212 #define max5(a, b, c, d, e) max(a, max4(b, c, d, e)) 213 #define max6(a, b, c, d, e, f) max(a, max5(b, c, d, e, f)) 214 #define max7(a, b, c, d, e, f, g) max(a, max6(b, c, d, e, f, g)) 215 #define max8(a, b, c, d, e, f, g, h) max(a, max7(b, c, d, e, f, g, h)) 216 #define max9(a, b, c, d, e, f, g, h, i) max(a, max8(b, c, d, e, f, g, h, i)) 217 218 #define avg3(a, b, c) (a + b + c) * (1.0 / 3.0) 219 #define avg4(a, b, c, d) (a + b + c + d) * (1.0 / 4.0) 220 #define avg5(a, b, c, d, e) (a + b + c + d + e) * (1.0 / 5.0) 221 #define avg6(a, b, c, d, e, f) (a + b + c + d + e + f) * (1.0 / 6.0) 222 #define avg7(a, b, c, d, e, f, g) (a + b + c + d + e + f + g) * (1.0 / 7.0) 223 #define avg8(a, b, c, d, e, f, g, h) (a + b + c + d + e + f + g + h) * (1.0 / 8.0) 224 #define avg9(a, b, c, d, e, f, g, h, i) (a + b + c + d + e + f + g + h + i) * (1.0 / 9.0) 225 226 float min_v2(vec2 v) 227 { 228 return min(v.x, v.y); 229 } 230 float min_v3(vec3 v) 231 { 232 return min(v.x, min(v.y, v.z)); 233 } 234 float max_v2(vec2 v) 235 { 236 return max(v.x, v.y); 237 } 238 float max_v3(vec3 v) 239 { 240 return max(v.x, max(v.y, v.z)); 241 } 242 243 float sum(vec2 v) 244 { 245 return dot(vec2(1.0), v); 246 } 247 float sum(vec3 v) 248 { 249 return dot(vec3(1.0), v); 250 } 251 float sum(vec4 v) 252 { 253 return dot(vec4(1.0), v); 254 } 255 256 float saturate(float a) 257 { 258 return clamp(a, 0.0, 1.0); 259 } 260 vec2 saturate(vec2 a) 261 { 262 return clamp(a, 0.0, 1.0); 263 } 264 vec3 saturate(vec3 a) 265 { 266 return clamp(a, 0.0, 1.0); 267 } 268 vec4 saturate(vec4 a) 269 { 270 return clamp(a, 0.0, 1.0); 271 } 272 273 float distance_squared(vec2 a, vec2 b) 274 { 275 a -= b; 276 return dot(a, a); 277 } 278 float distance_squared(vec3 a, vec3 b) 279 { 280 a -= b; 281 return dot(a, a); 282 } 283 float len_squared(vec3 a) 284 { 285 return dot(a, a); 286 } 287 288 float inverse_distance(vec3 V) 289 { 290 return max(1 / length(V), 1e-8); 291 } 292 293 vec2 mip_ratio_interp(float mip) 294 { 295 float low_mip = floor(mip); 296 return mix(mipRatio[int(low_mip)], mipRatio[int(low_mip + 1.0)], mip - low_mip); 297 } 298 299 /* ------- RNG ------- */ 300 301 float wang_hash_noise(uint s) 302 { 303 s = (s ^ 61u) ^ (s >> 16u); 304 s *= 9u; 305 s = s ^ (s >> 4u); 306 s *= 0x27d4eb2du; 307 s = s ^ (s >> 15u); 308 309 return fract(float(s) / 4294967296.0); 310 } 311 312 /* ------- Fast Math ------- */ 313 314 /* [Drobot2014a] Low Level Optimizations for GCN */ 315 float fast_sqrt(float v) 316 { 317 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 318 } 319 320 vec2 fast_sqrt(vec2 v) 321 { 322 return intBitsToFloat(0x1fbd1df5 + (floatBitsToInt(v) >> 1)); 323 } 324 325 /* [Eberly2014] GPGPU Programming for Games and Science */ 326 float fast_acos(float v) 327 { 328 float res = -0.156583 * abs(v) + M_PI_2; 329 res *= fast_sqrt(1.0 - abs(v)); 330 return (v >= 0) ? res : M_PI - res; 331 } 332 333 vec2 fast_acos(vec2 v) 334 { 335 vec2 res = -0.156583 * abs(v) + M_PI_2; 336 res *= fast_sqrt(1.0 - abs(v)); 337 v.x = (v.x >= 0) ? res.x : M_PI - res.x; 338 v.y = (v.y >= 0) ? res.y : M_PI - res.y; 339 return v; 340 } 341 342 float point_plane_projection_dist(vec3 lineorigin, vec3 planeorigin, vec3 planenormal) 343 { 344 return dot(planenormal, planeorigin - lineorigin); 345 } 346 347 float line_plane_intersect_dist(vec3 lineorigin, 348 vec3 linedirection, 349 vec3 planeorigin, 350 vec3 planenormal) 351 { 352 return dot(planenormal, planeorigin - lineorigin) / dot(planenormal, linedirection); 353 } 354 355 float line_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec4 plane) 356 { 357 vec3 plane_co = plane.xyz * (-plane.w / len_squared(plane.xyz)); 358 vec3 h = lineorigin - plane_co; 359 return -dot(plane.xyz, h) / dot(plane.xyz, linedirection); 360 } 361 362 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin, vec3 planenormal) 363 { 364 float dist = line_plane_intersect_dist(lineorigin, linedirection, planeorigin, planenormal); 365 return lineorigin + linedirection * dist; 366 } 367 368 vec3 line_plane_intersect(vec3 lineorigin, vec3 linedirection, vec4 plane) 369 { 370 float dist = line_plane_intersect_dist(lineorigin, linedirection, plane); 371 return lineorigin + linedirection * dist; 372 } 373 374 float line_aligned_plane_intersect_dist(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 375 { 376 /* aligned plane normal */ 377 vec3 L = planeorigin - lineorigin; 378 float diskdist = length(L); 379 vec3 planenormal = -normalize(L); 380 return -diskdist / dot(planenormal, linedirection); 381 } 382 383 vec3 line_aligned_plane_intersect(vec3 lineorigin, vec3 linedirection, vec3 planeorigin) 384 { 385 float dist = line_aligned_plane_intersect_dist(lineorigin, linedirection, planeorigin); 386 if (dist < 0) { 387 /* if intersection is behind we fake the intersection to be 388 * really far and (hopefully) not inside the radius of interest */ 389 dist = 1e16; 390 } 391 return lineorigin + linedirection * dist; 392 } 393 394 float line_unit_sphere_intersect_dist(vec3 lineorigin, vec3 linedirection) 395 { 396 float a = dot(linedirection, linedirection); 397 float b = dot(linedirection, lineorigin); 398 float c = dot(lineorigin, lineorigin) - 1; 399 400 float dist = 1e15; 401 float determinant = b * b - a * c; 402 if (determinant >= 0) { 403 dist = (sqrt(determinant) - b) / a; 404 } 405 406 return dist; 407 } 408 409 float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection) 410 { 411 /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ */ 412 vec3 firstplane = (vec3(1.0) - lineorigin) / linedirection; 413 vec3 secondplane = (vec3(-1.0) - lineorigin) / linedirection; 414 vec3 furthestplane = max(firstplane, secondplane); 415 416 return min_v3(furthestplane); 417 } 418 419 /* Return texture coordinates to sample Surface LUT */ 420 vec2 lut_coords(float cosTheta, float roughness) 421 { 422 float theta = acos(cosTheta); 423 vec2 coords = vec2(roughness, theta / M_PI_2); 424 425 /* scale and bias coordinates, for correct filtered lookup */ 426 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 427 } 428 429 vec2 lut_coords_ltc(float cosTheta, float roughness) 430 { 431 vec2 coords = vec2(roughness, sqrt(1.0 - cosTheta)); 432 433 /* scale and bias coordinates, for correct filtered lookup */ 434 return coords * (LUT_SIZE - 1.0) / LUT_SIZE + 0.5 / LUT_SIZE; 435 } 436 437 /* -- Tangent Space conversion -- */ 438 vec3 tangent_to_world(vec3 vector, vec3 N, vec3 T, vec3 B) 439 { 440 return T * vector.x + B * vector.y + N * vector.z; 441 } 442 443 vec3 world_to_tangent(vec3 vector, vec3 N, vec3 T, vec3 B) 444 { 445 return vec3(dot(T, vector), dot(B, vector), dot(N, vector)); 446 } 447 448 void make_orthonormal_basis(vec3 N, out vec3 T, out vec3 B) 449 { 450 vec3 UpVector = abs(N.z) < 0.99999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 451 T = normalize(cross(UpVector, N)); 452 B = cross(N, T); 453 } 454 455 /* ---- Opengl Depth conversion ---- */ 456 457 float linear_depth(bool is_persp, float z, float zf, float zn) 458 { 459 if (is_persp) { 460 return (zn * zf) / (z * (zn - zf) + zf); 461 } 462 else { 463 return (z * 2.0 - 1.0) * zf; 464 } 465 } 466 467 float buffer_depth(bool is_persp, float z, float zf, float zn) 468 { 469 if (is_persp) { 470 return (zf * (zn - z)) / (z * (zn - zf)); 471 } 472 else { 473 return (z / (zf * 2.0)) + 0.5; 474 } 475 } 476 477 float get_view_z_from_depth(float depth) 478 { 479 if (ProjectionMatrix[3][3] == 0.0) { 480 float d = 2.0 * depth - 1.0; 481 return -ProjectionMatrix[3][2] / (d + ProjectionMatrix[2][2]); 482 } 483 else { 484 return viewVecs[0].z + depth * viewVecs[1].z; 485 } 486 } 487 488 float get_depth_from_view_z(float z) 489 { 490 if (ProjectionMatrix[3][3] == 0.0) { 491 float d = (-ProjectionMatrix[3][2] / z) - ProjectionMatrix[2][2]; 492 return d * 0.5 + 0.5; 493 } 494 else { 495 return (z - viewVecs[0].z) / viewVecs[1].z; 496 } 497 } 498 499 vec2 get_uvs_from_view(vec3 view) 500 { 501 vec3 ndc = project_point(ProjectionMatrix, view); 502 return ndc.xy * 0.5 + 0.5; 503 } 504 505 vec3 get_view_space_from_depth(vec2 uvcoords, float depth) 506 { 507 if (ProjectionMatrix[3][3] == 0.0) { 508 return vec3(viewVecs[0].xy + uvcoords * viewVecs[1].xy, 1.0) * get_view_z_from_depth(depth); 509 } 510 else { 511 return viewVecs[0].xyz + vec3(uvcoords, depth) * viewVecs[1].xyz; 512 } 513 } 514 515 vec3 get_world_space_from_depth(vec2 uvcoords, float depth) 516 { 517 return (ViewMatrixInverse * vec4(get_view_space_from_depth(uvcoords, depth), 1.0)).xyz; 518 } 519 520 vec3 get_specular_reflection_dominant_dir(vec3 N, vec3 V, float roughness) 521 { 522 vec3 R = -reflect(V, N); 523 float smoothness = 1.0 - roughness; 524 float fac = smoothness * (sqrt(smoothness) + roughness); 525 return normalize(mix(N, R, fac)); 526 } 527 528 float specular_occlusion(float NV, float AO, float roughness) 529 { 530 return saturate(pow(NV + AO, roughness) - 1.0 + AO); 531 } 532 533 /* --- Refraction utils --- */ 534 535 float ior_from_f0(float f0) 536 { 537 float f = sqrt(f0); 538 return (-f - 1.0) / (f - 1.0); 539 } 540 541 float f0_from_ior(float eta) 542 { 543 float A = (eta - 1.0) / (eta + 1.0); 544 return A * A; 545 } 546 547 vec3 get_specular_refraction_dominant_dir(vec3 N, vec3 V, float roughness, float ior) 548 { 549 /* TODO: This a bad approximation. Better approximation should fit 550 * the refracted vector and roughness into the best prefiltered reflection 551 * lobe. */ 552 /* Correct the IOR for ior < 1.0 to not see the abrupt delimitation or the TIR */ 553 ior = (ior < 1.0) ? mix(ior, 1.0, roughness) : ior; 554 float eta = 1.0 / ior; 555 556 float NV = dot(N, -V); 557 558 /* Custom Refraction. */ 559 float k = 1.0 - eta * eta * (1.0 - NV * NV); 560 k = max(0.0, k); /* Only this changes. */ 561 vec3 R = eta * -V - (eta * NV + sqrt(k)) * N; 562 563 return R; 564 } 565 566 float get_btdf_lut(sampler2DArray btdf_lut_tex, float NV, float roughness, float ior) 567 { 568 const vec3 lut_scale_bias_texel_size = vec3((LUT_SIZE - 1.0), 0.5, 1.5) / LUT_SIZE; 569 570 vec3 coords; 571 /* Try to compensate for the low resolution and interpolation error. */ 572 coords.x = (ior > 1.0) ? (0.9 + lut_scale_bias_texel_size.z) + 573 (0.1 - lut_scale_bias_texel_size.z) * f0_from_ior(ior) : 574 (0.9 + lut_scale_bias_texel_size.z) * ior * ior; 575 coords.y = 1.0 - saturate(NV); 576 coords.xy *= lut_scale_bias_texel_size.x; 577 coords.xy += lut_scale_bias_texel_size.y; 578 579 const float lut_lvl_ofs = 4.0; /* First texture lvl of roughness. */ 580 const float lut_lvl_scale = 16.0; /* How many lvl of roughness in the lut. */ 581 582 float mip = roughness * lut_lvl_scale; 583 float mip_floor = floor(mip); 584 585 coords.z = lut_lvl_ofs + mip_floor + 1.0; 586 float btdf_high = textureLod(btdf_lut_tex, coords, 0.0).r; 587 588 coords.z -= 1.0; 589 float btdf_low = textureLod(btdf_lut_tex, coords, 0.0).r; 590 591 float btdf = (ior == 1.0) ? 1.0 : mix(btdf_low, btdf_high, mip - coords.z); 592 593 return btdf; 594 } 595 596 /* ---- Encode / Decode Normal buffer data ---- */ 597 /* From http://aras-p.info/texts/CompactNormalStorage.html 598 * Using Method #4: Spheremap Transform */ 599 vec2 normal_encode(vec3 n, vec3 view) 600 { 601 float p = sqrt(n.z * 8.0 + 8.0); 602 return n.xy / p + 0.5; 603 } 604 605 vec3 normal_decode(vec2 enc, vec3 view) 606 { 607 vec2 fenc = enc * 4.0 - 2.0; 608 float f = dot(fenc, fenc); 609 float g = sqrt(1.0 - f / 4.0); 610 vec3 n; 611 n.xy = fenc * g; 612 n.z = 1 - f / 2; 613 return n; 614 } 615 616 /* ---- RGBM (shared multiplier) encoding ---- */ 617 /* From http://iwasbeingirony.blogspot.fr/2010/06/difference-between-rgbm-and-rgbd.html */ 618 619 /* Higher RGBM_MAX_RANGE gives imprecision issues in low intensity. */ 620 #define RGBM_MAX_RANGE 512.0 621 622 vec4 rgbm_encode(vec3 rgb) 623 { 624 float maxRGB = max_v3(rgb); 625 float M = maxRGB / RGBM_MAX_RANGE; 626 M = ceil(M * 255.0) / 255.0; 627 return vec4(rgb / (M * RGBM_MAX_RANGE), M); 628 } 629 630 vec3 rgbm_decode(vec4 data) 631 { 632 return data.rgb * (data.a * RGBM_MAX_RANGE); 633 } 634 635 /* ---- RGBE (shared exponent) encoding ---- */ 636 vec4 rgbe_encode(vec3 rgb) 637 { 638 float maxRGB = max_v3(rgb); 639 float fexp = ceil(log2(maxRGB)); 640 return vec4(rgb / exp2(fexp), (fexp + 128.0) / 255.0); 641 } 642 643 vec3 rgbe_decode(vec4 data) 644 { 645 float fexp = data.a * 255.0 - 128.0; 646 return data.rgb * exp2(fexp); 647 } 648 649 #if 1 650 # define irradiance_encode rgbe_encode 651 # define irradiance_decode rgbe_decode 652 #else /* No ecoding (when using floating point format) */ 653 # define irradiance_encode(X) (X).rgbb 654 # define irradiance_decode(X) (X).rgb 655 #endif 656 657 /* Irradiance Visibility Encoding */ 658 #if 1 659 vec4 visibility_encode(vec2 accum, float range) 660 { 661 accum /= range; 662 663 vec4 data; 664 data.x = fract(accum.x); 665 data.y = floor(accum.x) / 255.0; 666 data.z = fract(accum.y); 667 data.w = floor(accum.y) / 255.0; 668 669 return data; 670 } 671 672 vec2 visibility_decode(vec4 data, float range) 673 { 674 return (data.xz + data.yw * 255.0) * range; 675 } 676 #else /* No ecoding (when using floating point format) */ 677 vec4 visibility_encode(vec2 accum, float range) 678 { 679 return accum.xyxy; 680 } 681 682 vec2 visibility_decode(vec4 data, float range) 683 { 684 return data.xy; 685 } 686 #endif 687 688 /* Fresnel monochromatic, perfect mirror */ 689 float F_eta(float eta, float cos_theta) 690 { 691 /* compute fresnel reflectance without explicitly computing 692 * the refracted direction */ 693 float c = abs(cos_theta); 694 float g = eta * eta - 1.0 + c * c; 695 float result; 696 697 if (g > 0.0) { 698 g = sqrt(g); 699 vec2 g_c = vec2(g) + vec2(c, -c); 700 float A = g_c.y / g_c.x; 701 A *= A; 702 g_c *= c; 703 float B = (g_c.y - 1.0) / (g_c.x + 1.0); 704 B *= B; 705 result = 0.5 * A * (1.0 + B); 706 } 707 else { 708 result = 1.0; /* TIR (no refracted component) */ 709 } 710 711 return result; 712 } 713 714 /* Fresnel color blend base on fresnel factor */ 715 vec3 F_color_blend(float eta, float fresnel, vec3 f0_color) 716 { 717 float f0 = F_eta(eta, 1.0); 718 float fac = saturate((fresnel - f0) / max(1e-8, 1.0 - f0)); 719 return mix(f0_color, vec3(1.0), fac); 720 } 721 722 /* Fresnel */ 723 vec3 F_schlick(vec3 f0, float cos_theta) 724 { 725 float fac = 1.0 - cos_theta; 726 float fac2 = fac * fac; 727 fac = fac2 * fac2 * fac; 728 729 /* Unreal specular matching : if specular color is below 2% intensity, 730 * (using green channel for intensity) treat as shadowning */ 731 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * fac + (1.0 - fac) * f0; 732 } 733 734 /* Fresnel approximation for LTC area lights (not MRP) */ 735 vec3 F_area(vec3 f0, vec2 lut) 736 { 737 /* Unreal specular matching : if specular color is below 2% intensity, 738 * treat as shadowning */ 739 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 740 } 741 742 /* Fresnel approximation for IBL */ 743 vec3 F_ibl(vec3 f0, vec2 lut) 744 { 745 /* Unreal specular matching : if specular color is below 2% intensity, 746 * treat as shadowning */ 747 return saturate(50.0 * dot(f0, vec3(0.3, 0.6, 0.1))) * lut.y + lut.x * f0; 748 } 749 750 /* GGX */ 751 float D_ggx_opti(float NH, float a2) 752 { 753 float tmp = (NH * a2 - NH) * NH + 1.0; 754 return M_PI * tmp * tmp; /* Doing RCP and mul a2 at the end */ 755 } 756 757 float G1_Smith_GGX(float NX, float a2) 758 { 759 /* Using Brian Karis approach and refactoring by NX/NX 760 * this way the (2*NL)*(2*NV) in G = G1(V) * G1(L) gets canceled by the brdf denominator 4*NL*NV 761 * Rcp is done on the whole G later 762 * Note that this is not convenient for the transmission formula */ 763 return NX + sqrt(NX * (NX - NX * a2) + a2); 764 /* return 2 / (1 + sqrt(1 + a2 * (1 - NX*NX) / (NX*NX) ) ); /* Reference function */ 765 } 766 767 float bsdf_ggx(vec3 N, vec3 L, vec3 V, float roughness) 768 { 769 float a = roughness; 770 float a2 = a * a; 771 772 vec3 H = normalize(L + V); 773 float NH = max(dot(N, H), 1e-8); 774 float NL = max(dot(N, L), 1e-8); 775 float NV = max(dot(N, V), 1e-8); 776 777 float G = G1_Smith_GGX(NV, a2) * G1_Smith_GGX(NL, a2); /* Doing RCP at the end */ 778 float D = D_ggx_opti(NH, a2); 779 780 /* Denominator is canceled by G1_Smith */ 781 /* bsdf = D * G / (4.0 * NL * NV); /* Reference function */ 782 return NL * a2 / (D * G); /* NL to Fit cycles Equation : line. 345 in bsdf_microfacet.h */ 783 } 784 785 void accumulate_light(vec3 light, float fac, inout vec4 accum) 786 { 787 accum += vec4(light, 1.0) * min(fac, (1.0 - accum.a)); 788 } 789 790 /* ----------- Cone Aperture Approximation --------- */ 791 792 /* Return a fitted cone angle given the input roughness */ 793 float cone_cosine(float r) 794 { 795 /* Using phong gloss 796 * roughness = sqrt(2/(gloss+2)) */ 797 float gloss = -2 + 2 / (r * r); 798 /* Drobot 2014 in GPUPro5 */ 799 // return cos(2.0 * sqrt(2.0 / (gloss + 2))); 800 /* Uludag 2014 in GPUPro5 */ 801 // return pow(0.244, 1 / (gloss + 1)); 802 /* Jimenez 2016 in Practical Realtime Strategies for Accurate Indirect Occlusion*/ 803 return exp2(-3.32193 * r * r); 804 } 805 806 /* --------- Closure ---------- */ 807 #ifdef VOLUMETRICS 808 809 struct Closure { 810 vec3 absorption; 811 vec3 scatter; 812 vec3 emission; 813 float anisotropy; 814 }; 815 816 # define CLOSURE_DEFAULT Closure(vec3(0.0), vec3(0.0), vec3(0.0), 0.0) 817 818 Closure closure_mix(Closure cl1, Closure cl2, float fac) 819 { 820 Closure cl; 821 cl.absorption = mix(cl1.absorption, cl2.absorption, fac); 822 cl.scatter = mix(cl1.scatter, cl2.scatter, fac); 823 cl.emission = mix(cl1.emission, cl2.emission, fac); 824 cl.anisotropy = mix(cl1.anisotropy, cl2.anisotropy, fac); 825 return cl; 826 } 827 828 Closure closure_add(Closure cl1, Closure cl2) 829 { 830 Closure cl; 831 cl.absorption = cl1.absorption + cl2.absorption; 832 cl.scatter = cl1.scatter + cl2.scatter; 833 cl.emission = cl1.emission + cl2.emission; 834 cl.anisotropy = (cl1.anisotropy + cl2.anisotropy) / 2.0; /* Average phase (no multi lobe) */ 835 return cl; 836 } 837 838 Closure closure_emission(vec3 rgb) 839 { 840 Closure cl = CLOSURE_DEFAULT; 841 cl.emission = rgb; 842 return cl; 843 } 844 845 #else /* VOLUMETRICS */ 846 847 struct Closure { 848 vec3 radiance; 849 float opacity; 850 # ifdef USE_SSS 851 vec4 sss_data; 852 # ifdef USE_SSS_ALBEDO 853 vec3 sss_albedo; 854 # endif 855 # endif 856 vec4 ssr_data; 857 vec2 ssr_normal; 858 int ssr_id; 859 }; 860 861 /* This is hacking ssr_id to tag transparent bsdf */ 862 # define TRANSPARENT_CLOSURE_FLAG -2 863 # define REFRACT_CLOSURE_FLAG -3 864 # define NO_SSR -999 865 866 # ifdef USE_SSS 867 # ifdef USE_SSS_ALBEDO 868 # define CLOSURE_DEFAULT \ 869 Closure(vec3(0.0), 1.0, vec4(0.0), vec3(0.0), vec4(0.0), vec2(0.0), -1) 870 # else 871 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec4(0.0), vec2(0.0), -1) 872 # endif 873 # else 874 # define CLOSURE_DEFAULT Closure(vec3(0.0), 1.0, vec4(0.0), vec2(0.0), -1) 875 # endif 876 877 uniform int outputSsrId; 878 879 Closure closure_mix(Closure cl1, Closure cl2, float fac) 880 { 881 Closure cl; 882 883 if (cl1.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 884 cl1.ssr_normal = cl2.ssr_normal; 885 cl1.ssr_data = cl2.ssr_data; 886 cl1.ssr_id = cl2.ssr_id; 887 # ifdef USE_SSS 888 cl1.sss_data = cl2.sss_data; 889 # ifdef USE_SSS_ALBEDO 890 cl1.sss_albedo = cl2.sss_albedo; 891 # endif 892 # endif 893 } 894 if (cl2.ssr_id == TRANSPARENT_CLOSURE_FLAG) { 895 cl2.ssr_normal = cl1.ssr_normal; 896 cl2.ssr_data = cl1.ssr_data; 897 cl2.ssr_id = cl1.ssr_id; 898 # ifdef USE_SSS 899 cl2.sss_data = cl1.sss_data; 900 # ifdef USE_SSS_ALBEDO 901 cl2.sss_albedo = cl1.sss_albedo; 902 # endif 903 # endif 904 } 905 906 /* When mixing SSR don't blend roughness. 907 * 908 * It makes no sense to mix them really, so we take either one of them and 909 * tone down its specularity (ssr_data.xyz) while keeping its roughness (ssr_data.w). 910 */ 911 if (cl1.ssr_id == outputSsrId) { 912 cl.ssr_data = mix(cl1.ssr_data.xyzw, vec4(vec3(0.0), cl1.ssr_data.w), fac); 913 cl.ssr_normal = cl1.ssr_normal; 914 cl.ssr_id = cl1.ssr_id; 915 } 916 else { 917 cl.ssr_data = mix(vec4(vec3(0.0), cl2.ssr_data.w), cl2.ssr_data.xyzw, fac); 918 cl.ssr_normal = cl2.ssr_normal; 919 cl.ssr_id = cl2.ssr_id; 920 } 921 922 cl.opacity = mix(cl1.opacity, cl2.opacity, fac); 923 cl.radiance = mix(cl1.radiance * cl1.opacity, cl2.radiance * cl2.opacity, fac); 924 cl.radiance /= max(1e-8, cl.opacity); 925 926 # ifdef USE_SSS 927 cl.sss_data.rgb = mix(cl1.sss_data.rgb, cl2.sss_data.rgb, fac); 928 cl.sss_data.a = (cl1.sss_data.a > 0.0) ? cl1.sss_data.a : cl2.sss_data.a; 929 # ifdef USE_SSS_ALBEDO 930 /* TODO Find a solution to this. Dither? */ 931 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 932 # endif 933 # endif 934 935 return cl; 936 } 937 938 Closure closure_add(Closure cl1, Closure cl2) 939 { 940 Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; 941 cl.radiance = cl1.radiance + cl2.radiance; 942 # ifdef USE_SSS 943 cl.sss_data = (cl1.sss_data.a > 0.0) ? cl1.sss_data : cl2.sss_data; 944 /* Add radiance that was supposed to be filtered but was rejected. */ 945 cl.radiance += (cl1.sss_data.a > 0.0) ? cl2.sss_data.rgb : cl1.sss_data.rgb; 946 # ifdef USE_SSS_ALBEDO 947 /* TODO Find a solution to this. Dither? */ 948 cl.sss_albedo = (cl1.sss_data.a > 0.0) ? cl1.sss_albedo : cl2.sss_albedo; 949 # endif 950 # endif 951 cl.opacity = saturate(cl1.opacity + cl2.opacity); 952 return cl; 953 } 954 955 Closure closure_emission(vec3 rgb) 956 { 957 Closure cl = CLOSURE_DEFAULT; 958 cl.radiance = rgb; 959 return cl; 960 } 961 962 # if defined(MESH_SHADER) && !defined(USE_ALPHA_HASH) && !defined(USE_ALPHA_CLIP) && \ 963 !defined(SHADOW_SHADER) && !defined(USE_MULTIPLY) 964 layout(location = 0) out vec4 fragColor; 965 layout(location = 1) out vec4 ssrNormals; 966 layout(location = 2) out vec4 ssrData; 967 # ifdef USE_SSS 968 layout(location = 3) out vec4 sssData; 969 # ifdef USE_SSS_ALBEDO 970 layout(location = 4) out vec4 sssAlbedo; 971 # endif /* USE_SSS_ALBEDO */ 972 # endif /* USE_SSS */ 973 974 Closure nodetree_exec(void); /* Prototype */ 975 976 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 977 /* Prototype because this file is included before volumetric_lib.glsl */ 978 vec4 volumetric_resolve(vec4 scene_color, vec2 frag_uvs, float frag_depth); 979 # endif 980 981 # define NODETREE_EXEC 982 void main() 983 { 984 Closure cl = nodetree_exec(); 985 # ifndef USE_ALPHA_BLEND 986 /* Prevent alpha hash material writing into alpha channel. */ 987 cl.opacity = 1.0; 988 # endif 989 990 # if defined(USE_ALPHA_BLEND_VOLUMETRICS) 991 /* XXX fragile, better use real viewport resolution */ 992 vec2 uvs = gl_FragCoord.xy / vec2(2 * textureSize(maxzBuffer, 0).xy); 993 fragColor.rgb = volumetric_resolve(vec4(cl.radiance, cl.opacity), uvs, gl_FragCoord.z).rgb; 994 fragColor.a = cl.opacity; 995 # else 996 fragColor = vec4(cl.radiance, cl.opacity); 997 # endif 998 999 ssrNormals = cl.ssr_normal.xyyy; 1000 ssrData = cl.ssr_data; 1001 # ifdef USE_SSS 1002 sssData = cl.sss_data; 1003 # ifdef USE_SSS_ALBEDO 1004 sssAlbedo = cl.sss_albedo.rgbb; 1005 # endif 1006 # endif 1007 1008 /* For Probe capture */ 1009 # ifdef USE_SSS 1010 # ifdef USE_SSS_ALBEDO 1011 fragColor.rgb += cl.sss_data.rgb * cl.sss_albedo.rgb * float(!sssToggle); 1012 # else 1013 fragColor.rgb += cl.sss_data.rgb * float(!sssToggle); 1014 # endif 1015 # endif 1016 } 1017 1018 # endif /* MESH_SHADER && !SHADOW_SHADER */ 1019 1020 #endif /* VOLUMETRICS */ 1021 1022 Closure nodetree_exec(void); /* Prototype */ 1023 1024 /* TODO find a better place */ 1025 #ifdef USE_MULTIPLY 1026 1027 out vec4 fragColor; 1028 1029 # define NODETREE_EXEC 1030 void main() 1031 { 1032 Closure cl = nodetree_exec(); 1033 fragColor = vec4(mix(vec3(1.0), cl.radiance, cl.opacity), 1.0); 1034 } 1035 #endif 1036 1037 uniform sampler2D colorHistoryBuffer; 1038 uniform sampler2D velocityBuffer; 1039 1040 out vec4 FragColor; 1041 1042 vec4 safe_color(vec4 c) 1043 { 1044 /* Clamp to avoid black square artifacts if a pixel goes NaN. */ 1045 return clamp(c, vec4(0.0), vec4(1e20)); /* 1e20 arbitrary. */ 1046 } 1047 1048 #ifdef USE_REPROJECTION 1049 1050 /** 1051 * Adapted from https://casual-effects.com/g3d/G3D10/data-files/shader/Film/Film_temporalAA.pix 1052 * which is adapted from https://github.com/gokselgoktas/temporal-anti-aliasing/blob/master/Assets/Resources/Shaders/TemporalAntiAliasing.cginc 1053 * which is adapted from https://github.com/playdeadgames/temporal 1054 * Optimization by Stubbesaurus and epsilon adjustment to avoid division by zero. 1055 * 1056 * This can cause 3x3 blocks of color when there is a thin edge of a similar color that 1057 * is varying in intensity. 1058 */ 1059 vec3 clip_to_aabb(vec3 color, vec3 minimum, vec3 maximum, vec3 average) 1060 { 1061 /* note: only clips towards aabb center (but fast!) */ 1062 vec3 center = 0.5 * (maximum + minimum); 1063 vec3 extents = 0.5 * (maximum - minimum); 1064 vec3 dist = color - center; 1065 vec3 ts = abs(extents) / max(abs(dist), vec3(0.0001)); 1066 float t = saturate(min_v3(ts)); 1067 return center + dist * t; 1068 } 1069 1070 /** 1071 * Vastly based on https://github.com/playdeadgames/temporal 1072 */ 1073 void main() 1074 { 1075 ivec2 texel = ivec2(gl_FragCoord.xy); 1076 float depth = texelFetch(depthBuffer, texel, 0).r; 1077 vec2 motion = texelFetch(velocityBuffer, texel, 0).rg; 1078 1079 /* Decode from unsigned normalized 16bit texture. */ 1080 motion = motion * 2.0 - 1.0; 1081 1082 /* Compute pixel position in previous frame. */ 1083 vec2 screen_res = vec2(textureSize(colorBuffer, 0).xy); 1084 vec2 uv = gl_FragCoord.xy / screen_res; 1085 vec2 uv_history = uv - motion; 1086 1087 ivec2 texel_history = ivec2(uv_history * screen_res); 1088 vec4 color_history = textureLod(colorHistoryBuffer, uv_history, 0.0); 1089 1090 /* Color bounding box clamping. 3x3 neighborhood. */ 1091 vec4 c02 = texelFetchOffset(colorBuffer, texel, 0, ivec2(-1, 1)); 1092 vec4 c12 = texelFetchOffset(colorBuffer, texel, 0, ivec2(0, 1)); 1093 vec4 c22 = texelFetchOffset(colorBuffer, texel, 0, ivec2(1, 1)); 1094 vec4 c01 = texelFetchOffset(colorBuffer, texel, 0, ivec2(-1, 0)); 1095 vec4 c11 = texelFetchOffset(colorBuffer, texel, 0, ivec2(0, 0)); 1096 vec4 c21 = texelFetchOffset(colorBuffer, texel, 0, ivec2(1, 0)); 1097 vec4 c00 = texelFetchOffset(colorBuffer, texel, 0, ivec2(-1, -1)); 1098 vec4 c10 = texelFetchOffset(colorBuffer, texel, 0, ivec2(0, -1)); 1099 vec4 c20 = texelFetchOffset(colorBuffer, texel, 0, ivec2(1, -1)); 1100 1101 vec4 color = c11; 1102 1103 /* AABB minmax */ 1104 vec4 min_col = min9(c02, c12, c22, c01, c11, c21, c00, c10, c20); 1105 vec4 max_col = max9(c02, c12, c22, c01, c11, c21, c00, c10, c20); 1106 vec4 avg_col = avg9(c02, c12, c22, c01, c11, c21, c00, c10, c20); 1107 1108 /* bias the color aabb toward the center (rounding the shape) */ 1109 vec4 min_center = min5(c12, c01, c11, c21, c10); 1110 vec4 max_center = max5(c12, c01, c11, c21, c10); 1111 vec4 avg_center = avg5(c12, c01, c11, c21, c10); 1112 min_col = (min_col + min_center) * 0.5; 1113 max_col = (max_col + max_center) * 0.5; 1114 avg_col = (avg_col + avg_center) * 0.5; 1115 1116 /* Clip color toward the center of the neighborhood colors AABB box. */ 1117 color_history.rgb = clip_to_aabb(color_history.rgb, min_col.rgb, max_col.rgb, avg_col.rgb); 1118 1119 /* Luminance weighting. */ 1120 /* TODO correct luminance */ 1121 float lum0 = dot(color.rgb, vec3(0.333)); 1122 float lum1 = dot(color_history.rgb, vec3(0.333)); 1123 float diff = abs(lum0 - lum1) / max(lum0, max(lum1, 0.2)); 1124 float weight = 1.0 - diff; 1125 float alpha = mix(0.04, 0.12, weight * weight); 1126 1127 color_history = mix(color_history, color, alpha); 1128 1129 bool out_of_view = any(greaterThanEqual(abs(uv_history - 0.5), vec2(0.5))); 1130 color_history = (out_of_view) ? color : color_history; 1131 1132 FragColor = safe_color(color_history); 1133 } 1134 1135 #else 1136 1137 uniform float alpha; 1138 1139 void main() 1140 { 1141 ivec2 texel = ivec2(gl_FragCoord.xy); 1142 vec4 color = texelFetch(colorBuffer, texel, 0); 1143 vec4 color_history = texelFetch(colorHistoryBuffer, texel, 0); 1144 FragColor = safe_color(mix(color_history, color, alpha)); 1145 } 1146 #endif 0(962) : error C0105: Syntax error in #if 0(962) : error C0105: Syntax error in #if 0(963) : error C0000: syntax error, unexpected '!' at token "!" 0(1139) : error C1013: function "main" is already defined at 0(982) Error : EXCEPTION_ACCESS_VIOLATION Address : 0x0000000140E2D3E4 Module : E:\Blender\Blender Program\blender-2.80.0-git.b46245470f79-windows64 20.4.19\blender.exe