Skip to content

Commit

Permalink
Removed unused shader test from editor
Browse files Browse the repository at this point in the history
  • Loading branch information
sinnwrig committed Sep 3, 2024
1 parent ead3c62 commit 0643090
Showing 1 changed file with 2 additions and 77 deletions.
79 changes: 2 additions & 77 deletions Prowl.Editor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,75 +10,6 @@ namespace Prowl.Editor;

public static class Program
{
static string myFunkyShader =
"""
Shader "Funky"
Global
{
GLOBALINCLUDE
ENDGLOBAL
}
Pass "DaPass"
{
Blend Override
// Stencil state
DepthStencil
{
// Depth write
DepthWrite On
// Comparison kind
DepthTest LessEqual
}
// Rasterizer culling mode
Cull None
SHADERPROGRAM
#pragma vertex vert
#pragma fragment frag
struct attributes
{
float4 pos : POSITION;
float4 col : COLOR;
};
struct v2f
{
float4 pos : SV_POSITION;
float4 col : COLOR;
};
float4 SomeColor;
float4x4 SomeMatrix;
v2f vert(attributes input)
{
v2f output = (v2f)0;
output.pos = mul(SomeMatrix, input.pos);
output.col = input.col * SomeColor;
return output;
}
float4 frag(v2f input) : SV_TARGET
{
return input.col / SomeColor;
}
ENDPROGRAM
}
""";

public static event Action? OnDrawEditor;
public static event Action? OnUpdateEditor;

Expand All @@ -88,12 +19,6 @@ float4 frag(v2f input) : SV_TARGET
private static bool CreatedDefaultWindows = false;
public static int Main(string[] args)
{
//Shader shader = Utilities.ShaderParser.ParseShader(myFunkyShader);
//
//Console.WriteLine(shader.GetStringRepresentation());
//
//return 0;

// set global Culture to invariant
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
Application.Initialize += () =>
Expand Down Expand Up @@ -156,9 +81,9 @@ public static int Main(string[] args)
Screen.FramesPerSecond = 0;
}

if (Hotkeys.IsHotkeyDown("SaveSceneAs", new() { Key = Runtime.Key.S, Ctrl = true, Shift = true }))
if (Hotkeys.IsHotkeyDown("SaveSceneAs", new() { Key = Key.S, Ctrl = true, Shift = true }))
EditorGuiManager.SaveSceneAs();
else if (Hotkeys.IsHotkeyDown("SaveScene", new() { Key = Runtime.Key.S, Ctrl = true }))
else if (Hotkeys.IsHotkeyDown("SaveScene", new() { Key = Key.S, Ctrl = true }))
EditorGuiManager.SaveScene();

Application.isPlaying = PlayMode.Current == PlayMode.Mode.Playing;
Expand Down

0 comments on commit 0643090

Please sign in to comment.