2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

fix for dropfiles

This commit is contained in:
Mikael Rasmussen
2018-10-25 18:57:12 +02:00
parent a55406edb0
commit d4ba2b6c5a
5 changed files with 75 additions and 34 deletions

View File

@@ -105,9 +105,9 @@ public partial class models_material_pbr
// Send to material PBR shader camera view position
float[] cameraPos = { camera.position.x, camera.position.y, camera.position.z };
SetShaderValue(model.material.shader, model.material.shader.locs[(int)ShaderLocationIndex.LOC_VECTOR_VIEW], cameraPos, 3);
//----------------------------------------------------------------------------------
// Draw
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
@@ -138,7 +138,6 @@ public partial class models_material_pbr
// Load PBR material (Supports: ALBEDO, NORMAL, METALNESS, ROUGHNESS, AO, EMMISIVE, HEIGHT maps)
// NOTE: PBR shader is loaded inside this function
// NOTE: PBR shader is loaded inside this function
unsafe public static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
{
@@ -152,7 +151,7 @@ public partial class models_material_pbr
// Get required locations points for PBR material
// NOTE: Those location names must be available and used in the shader code
mat.shader.locs[(int)ShaderLocationIndex.LOC_MAP_ALBEDO] = GetShaderLocation(mat.shader, "albedo.sampler");
mat.shader.locs[(int)ShaderLocationIndex.LOC_MAP_METALNESS] = GetShaderLocation(mat.shader, "metalness.sampler");
mat.shader.locs[(int)ShaderLocationIndex.LOC_MAP_METALNESS] = GetShaderLocation(mat.shader, "metalness.sampler");
mat.shader.locs[(int)ShaderLocationIndex.LOC_MAP_NORMAL] = GetShaderLocation(mat.shader, "normals.sampler");
mat.shader.locs[(int)ShaderLocationIndex.LOC_MAP_ROUGHNESS] = GetShaderLocation(mat.shader, "roughness.sampler");
mat.shader.locs[(int)ShaderLocationIndex.LOC_MAP_OCCLUSION] = GetShaderLocation(mat.shader, "occlusion.sampler");