mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Shader #include + Remved unused Dx11Effect
This commit is contained in:
@@ -116,8 +116,7 @@ namespace GlitchyEditor
|
||||
|
||||
private void TestEntitiesWithModels()
|
||||
{
|
||||
Effect myEffect = new Effect("content/Shaders/myEffect.hlsl")..ReleaseRefNoDelete();
|
||||
|
||||
using (Effect myEffect = new Effect("content/Shaders/myEffect.hlsl"))
|
||||
using (Texture2D albedo = new Texture2D("Textures/TestMat/rustediron2_albedo.png", true))
|
||||
using (Texture2D normal = new Texture2D("Textures/TestMat/rustediron2_normal.png"))
|
||||
using (Texture2D rough = new Texture2D("Textures/TestMat/rustediron2_roughness.png"))
|
||||
@@ -127,31 +126,34 @@ namespace GlitchyEditor
|
||||
normal.SamplerState = SamplerStateManager.AnisotropicClamp;
|
||||
rough.SamplerState = SamplerStateManager.AnisotropicClamp;
|
||||
metal.SamplerState = SamplerStateManager.AnisotropicClamp;
|
||||
|
||||
Material mat = new Material(myEffect)..ReleaseRefNoDelete();
|
||||
mat.SetTexture("AlbedoTexture", albedo);
|
||||
mat.SetTexture("NormalTexture", normal);
|
||||
mat.SetTexture("MetallicTexture", metal);
|
||||
mat.SetTexture("RoughnessTexture", rough);
|
||||
//mat.SetVariable("BaseColor", Vector4(1, 0, 1, 1));
|
||||
//mat.SetVariable("LightDir", Vector3(1, 1, 0).Normalized());
|
||||
|
||||
List<AnimationClip> clips = scope .();
|
||||
|
||||
ModelLoader.LoadModel("content/Models/sphere.glb", myEffect, mat, _scene.[Friend]_ecsWorld, clips);
|
||||
|
||||
mat = new Material(myEffect)..ReleaseRefNoDelete();
|
||||
mat.SetTexture("AlbedoTexture", albedo);
|
||||
mat.SetTexture("NormalTexture", normal);
|
||||
mat.SetTexture("MetallicTexture", metal);
|
||||
mat.SetTexture("RoughnessTexture", rough);
|
||||
//mat.SetVariable("BaseColor", Vector4(1, 1, 0, 1));
|
||||
//mat.SetVariable("LightDir", Vector3(0, 1, 0).Normalized());
|
||||
|
||||
clips = scope .();
|
||||
|
||||
ModelLoader.LoadModel("content/Models/sphere.glb", myEffect, mat, _scene.[Friend]_ecsWorld, clips);
|
||||
|
||||
List<AnimationClip> clips = scope .();
|
||||
|
||||
using (Material mat = new .(myEffect))
|
||||
{
|
||||
mat.SetTexture("AlbedoTexture", albedo);
|
||||
mat.SetTexture("NormalTexture", normal);
|
||||
mat.SetTexture("MetallicTexture", metal);
|
||||
mat.SetTexture("RoughnessTexture", rough);
|
||||
//mat.SetVariable("BaseColor", Vector4(1, 0, 1, 1));
|
||||
//mat.SetVariable("LightDir", Vector3(1, 1, 0).Normalized());
|
||||
|
||||
ModelLoader.LoadModel("content/Models/sphere.glb", myEffect, mat, _scene.[Friend]_ecsWorld, clips);
|
||||
}
|
||||
|
||||
using (Material mat = new .(myEffect))
|
||||
{
|
||||
mat.SetTexture("AlbedoTexture", albedo);
|
||||
mat.SetTexture("NormalTexture", normal);
|
||||
mat.SetTexture("MetallicTexture", metal);
|
||||
mat.SetTexture("RoughnessTexture", rough);
|
||||
//mat.SetVariable("BaseColor", Vector4(1, 1, 0, 1));
|
||||
//mat.SetVariable("LightDir", Vector3(0, 1, 0).Normalized());
|
||||
|
||||
|
||||
ModelLoader.LoadModel("content/Models/sphere.glb", myEffect, mat, _scene.[Friend]_ecsWorld, clips);
|
||||
}
|
||||
|
||||
ClearAndReleaseItems!(clips);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user