@@ -23,6 +23,7 @@ protected override BindGroupLayout CreateBindGroupLayout()
2323 new BindGroupLayoutEntry ( new BufferBindingLayout ( BufferBindingType . Constant ) , 0 , ShaderStages . Fragment ) ,
2424 new BindGroupLayoutEntry ( new TextureBindingLayout ( ) , 0 , ShaderStages . Fragment ) , // baseColorTexture
2525 new BindGroupLayoutEntry ( new SamplerBindingLayout ( SamplerBindingType . Filtering ) , 0 ) , // baseColorSampler
26+ new BindGroupLayoutEntry ( new TextureBindingLayout ( ) , 1 , ShaderStages . Fragment ) , // normalTexture
2627 // Static samplers
2728 new BindGroupLayoutEntry ( SamplerDescriptor . PointClamp , 100 , ShaderStages . All ) , // SamplerPointClamp
2829 new BindGroupLayoutEntry ( SamplerDescriptor . PointWrap , 101 , ShaderStages . All ) , // SamplerPointWrap
@@ -62,7 +63,8 @@ protected override BindGroup CreateBindGroup(Material material)
6263
6364 BindGroup bindGroup = _bindGroupLayout . CreateBindGroup (
6465 new BindGroupEntry ( 0 , _materialBuffer ) ,
65- new BindGroupEntry ( 0 , pbrMaterial . BaseColorTexture ?? System . CheckerTexture ) ,
66+ new BindGroupEntry ( 0 , pbrMaterial . BaseColorTexture ?? System . OpaqueWhiteTexture ) ,
67+ new BindGroupEntry ( 0 , pbrMaterial . NormalTexture ?? System . DefaultNormalTexture ) ,
6668 new BindGroupEntry ( 0 , System . DefaultSampler )
6769 ) ;
6870
0 commit comments