forked from stride3d/stride
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request stride3d#1083 from salahchafai/GizmoImprovements
Improve the editor gizmos
- Loading branch information
Showing
17 changed files
with
458 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
sources/editor/Stride.Assets.Presentation/AssetEditors/Gizmos/GizmoShaderMaterial.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp) | ||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information. | ||
using Stride.Graphics; | ||
using Stride.Rendering; | ||
using Stride.Rendering.Materials; | ||
using Stride.Rendering.Materials.ComputeColors; | ||
|
||
namespace Stride.Assets.Presentation.AssetEditors.Gizmos | ||
{ | ||
public static class GizmoShaderMaterial | ||
{ | ||
public static Material Create(GraphicsDevice device, string shaderName) | ||
{ | ||
var material = Material.New(device, new MaterialDescriptor | ||
{ | ||
Attributes = | ||
{ | ||
Diffuse = new MaterialDiffuseMapFeature(new ComputeShaderClassColor() { MixinReference = shaderName }), | ||
DiffuseModel = new MaterialDiffuseLambertModelFeature(), | ||
Emissive = new MaterialEmissiveMapFeature(new ComputeShaderClassColor() { MixinReference = shaderName }) | ||
} | ||
}); | ||
|
||
return material; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.