removing un-used Shaders

master
Zaafar Ahmed 7 years ago
parent 7652acaa94
commit ef6721e414
  1. 8
      ClickableTransparentOverlay/ClickableTransparentOverlay.csproj
  2. 2
      ClickableTransparentOverlay/Overlay.cs
  3. 13
      ClickableTransparentOverlay/Shaders/GLSL/imgui-frag.glsl
  4. 20
      ClickableTransparentOverlay/Shaders/GLSL/imgui-vertex.glsl
  5. 18
      ClickableTransparentOverlay/Shaders/Metal/imgui-frag.metal
  6. BIN
      ClickableTransparentOverlay/Shaders/Metal/imgui-frag.metallib
  7. 27
      ClickableTransparentOverlay/Shaders/Metal/imgui-vertex.metal
  8. BIN
      ClickableTransparentOverlay/Shaders/Metal/imgui-vertex.metallib
  9. 2
      ClickableTransparentOverlay/Shaders/SPIR-V/generate-spirv.bat
  10. 16
      ClickableTransparentOverlay/Shaders/SPIR-V/imgui-frag.glsl
  11. BIN
      ClickableTransparentOverlay/Shaders/SPIR-V/imgui-frag.spv
  12. 29
      ClickableTransparentOverlay/Shaders/SPIR-V/imgui-vertex.glsl
  13. BIN
      ClickableTransparentOverlay/Shaders/SPIR-V/imgui-vertex.spv
  14. 2
      DriverProgram/Program.cs

@ -265,14 +265,8 @@
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<EmbeddedResource Include="Shaders\GLSL\imgui-vertex.glsl" LogicalName="imgui-vertex.glsl" />
<EmbeddedResource Include="Shaders\GLSL\imgui-frag.glsl" LogicalName="imgui-frag.glsl" />
<EmbeddedResource Include="Shaders\HLSL\imgui-vertex.hlsl.bytes" LogicalName="imgui-vertex.hlsl.bytes" />
<EmbeddedResource Include="Shaders\HLSL\imgui-frag.hlsl.bytes" LogicalName="imgui-frag.hlsl.bytes" />
<EmbeddedResource Include="Shaders\SPIR-V\imgui-vertex.spv" LogicalName="imgui-vertex.spv" />
<EmbeddedResource Include="Shaders\SPIR-V\imgui-frag.spv" LogicalName="imgui-frag.spv" />
<EmbeddedResource Include="Shaders\Metal\imgui-vertex.metallib" LogicalName="imgui-vertex.metallib" />
<EmbeddedResource Include="Shaders\Metal\imgui-frag.metallib" LogicalName="imgui-frag.metallib" />
</ItemGroup>
<ItemGroup>
<Content Include="cimgui.dll">
@ -287,4 +281,4 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\Veldrid.SDL2.4.5.0\build\net40\Veldrid.SDL2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Veldrid.SDL2.4.5.0\build\net40\Veldrid.SDL2.targets'))" />
</Target>
</Project>
</Project>

@ -42,7 +42,7 @@
_future_size = Vector2.Zero;
_future_pos = Vector2.Zero;
_window = new Sdl2Window("Overlay", x, x, width, height, SDL_WindowFlags.Borderless | SDL_WindowFlags.AlwaysOnTop | SDL_WindowFlags.SkipTaskbar, true);
_window = new Sdl2Window("Overlay", x, x, width, height, SDL_WindowFlags.Borderless | SDL_WindowFlags.AlwaysOnTop | SDL_WindowFlags.SkipTaskbar, false);
// TODO: Create a new branch for Non-Veldrid dependent version. Ideally, we can directly use SDL2Window.
_gd = VeldridStartup.CreateGraphicsDevice(_window, new GraphicsDeviceOptions(true, null, true), GraphicsBackend.Direct3D11);
NativeMethods.EnableTransparent(_window.Handle, new System.Drawing.Rectangle(_window.X , _window.Y, _window.Width, _window.Height));

@ -1,13 +0,0 @@
#version 330 core
uniform sampler2D FontTexture;
in vec4 color;
in vec2 texCoord;
out vec4 outputColor;
void main()
{
outputColor = color * texture(FontTexture, texCoord);
}

@ -1,20 +0,0 @@
#version 330 core
uniform ProjectionMatrixBuffer
{
mat4 projection_matrix;
};
in vec2 in_position;
in vec2 in_texCoord;
in vec4 in_color;
out vec4 color;
out vec2 texCoord;
void main()
{
gl_Position = projection_matrix * vec4(in_position, 0, 1);
color = in_color;
texCoord = in_texCoord;
}

@ -1,18 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct PS_INPUT
{
float4 pos [[ position ]];
float4 col;
float2 uv;
};
fragment float4 FS(
PS_INPUT input [[ stage_in ]],
texture2d<float> FontTexture [[ texture(0) ]],
sampler FontSampler [[ sampler(0) ]])
{
float4 out_col = input.col * FontTexture.sample(FontSampler, input.uv);
return out_col;
}

@ -1,27 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct VS_INPUT
{
float2 pos [[ attribute(0) ]];
float2 uv [[ attribute(1) ]];
float4 col [[ attribute(2) ]];
};
struct PS_INPUT
{
float4 pos [[ position ]];
float4 col;
float2 uv;
};
vertex PS_INPUT VS(
VS_INPUT input [[ stage_in ]],
constant float4x4 &ProjectionMatrix [[ buffer(1) ]])
{
PS_INPUT output;
output.pos = ProjectionMatrix * float4(input.pos.xy, 0.f, 1.f);
output.col = input.col;
output.uv = input.uv;
return output;
}

@ -1,2 +0,0 @@
glslangvalidator -V imgui-vertex.glsl -o imgui-vertex.spv -S vert
glslangvalidator -V imgui-frag.glsl -o imgui-frag.spv -S frag

@ -1,16 +0,0 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout(set = 1, binding = 0) uniform texture2D FontTexture;
layout(set = 0, binding = 1) uniform sampler FontSampler;
layout (location = 0) in vec4 color;
layout (location = 1) in vec2 texCoord;
layout (location = 0) out vec4 outputColor;
void main()
{
outputColor = color * texture(sampler2D(FontTexture, FontSampler), texCoord);
}

@ -1,29 +0,0 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout (location = 0) in vec2 vsin_position;
layout (location = 1) in vec2 vsin_texCoord;
layout (location = 2) in vec4 vsin_color;
layout (binding = 0) uniform Projection
{
mat4 projection;
};
layout (location = 0) out vec4 vsout_color;
layout (location = 1) out vec2 vsout_texCoord;
out gl_PerVertex
{
vec4 gl_Position;
};
void main()
{
gl_Position = projection * vec4(vsin_position, 0, 1);
vsout_color = vsin_color;
vsout_texCoord = vsin_texCoord;
gl_Position.y = -gl_Position.y;
}

@ -29,7 +29,7 @@
public static void DistroyDemo()
{
Thread.Sleep(100000);
Thread.Sleep(10000);
//demo.ResizeWindow(0, 0, 2560, 1440);
//Thread.Sleep(10000);
//demo.HideWindow();

Loading…
Cancel
Save