Giter Site home page Giter Site logo

dfranx / shadered Goto Github PK

View Code? Open in Web Editor NEW
4.2K 90.0 264.0 247.94 MB

Lightweight, cross-platform & full-featured shader IDE

Home Page: https://shadered.org/

License: MIT License

C++ 58.95% C 40.02% HLSL 0.23% GLSL 0.39% CMake 0.30% Shell 0.11% Meson 0.01%
shaders hlsl glsl opengl shader-editor gpgpu glsl-editors glsl-sandbox hlsl-shader game-development

shadered's People

Contributors

1ace avatar agreppin avatar bagobor avatar branc116 avatar calinou avatar chances avatar ctrlcctrlv avatar curioustommy avatar define-private-public avatar dfranx avatar fnky avatar jarveson avatar jcolicchio avatar justsid avatar kevingliewe avatar necauqua avatar ryanw avatar seanballais avatar tanis2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shadered's Issues

Access to last frame's matricies

I tried playing with temporal filtering in this app but quickly ran into the problem that there's no way to get data (variables) from the previous frame. It would be neat if there was a way to access the last frame's matricies, which are needed in temporal reprojection algorithms.

To select them they could simply be added to the list in the variables window:
grafik

On a different note, inverse matricies are also often used in shaders. It would be nice if they were available aswell, but it's not a big issue since they can be calculated in the shader.

VSync setting not applied on startup

It looks like the VSync option is not set correctly on app startup.

Steps to reproduce:

  • Open Window > Options
  • Enable VSync and apply settings
  • Close app

Expected result on next launch:

  • Framerate is capped to refresh rate

Actual results:

  • Framerate is uncapped
  • Checkbox still stays enabled although setting is not (UI mismatch)

Add frame number as input

Currently there doesn't seem to be a way to get the current frame number as integer. It's possible to approximate by multiplying the elapsed time by the framerate limit, but it's not very accurate.

Also sorry for making a bunch of requests, these are just the problems I ran into while playing with shadered.

The CMake install target doesn't install SHADERed binaries

When I install the project (from commit 624e77c) using CMake 3.14.5 on Fedora 31, I noticed headers are being installed but not the SHADERed binary (and associated resource folders):

❯ sudo cmake --build build --target install
[0/1] Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib64/libglslang.a
-- Installing: /usr/local/include/glslang/Public/ShaderLang.h
-- Installing: /usr/local/include/glslang/Include/arrays.h
-- Installing: /usr/local/include/glslang/Include/BaseTypes.h
-- Installing: /usr/local/include/glslang/Include/Common.h
-- Installing: /usr/local/include/glslang/Include/ConstantUnion.h
-- Installing: /usr/local/include/glslang/Include/InfoSink.h
-- Installing: /usr/local/include/glslang/Include/InitializeGlobals.h
-- Installing: /usr/local/include/glslang/Include/intermediate.h
-- Installing: /usr/local/include/glslang/Include/PoolAlloc.h
-- Installing: /usr/local/include/glslang/Include/ResourceLimits.h
-- Installing: /usr/local/include/glslang/Include/revision.h
-- Installing: /usr/local/include/glslang/Include/ShHandle.h
-- Installing: /usr/local/include/glslang/Include/Types.h
-- Installing: /usr/local/include/glslang/MachineIndependent/attribute.h
-- Installing: /usr/local/include/glslang/MachineIndependent/glslang_tab.cpp.h
-- Installing: /usr/local/include/glslang/MachineIndependent/gl_types.h
-- Installing: /usr/local/include/glslang/MachineIndependent/Initialize.h
-- Installing: /usr/local/include/glslang/MachineIndependent/iomapper.h
-- Installing: /usr/local/include/glslang/MachineIndependent/LiveTraverser.h
-- Installing: /usr/local/include/glslang/MachineIndependent/localintermediate.h
-- Installing: /usr/local/include/glslang/MachineIndependent/ParseHelper.h
-- Installing: /usr/local/include/glslang/MachineIndependent/reflection.h
-- Installing: /usr/local/include/glslang/MachineIndependent/RemoveTree.h
-- Installing: /usr/local/include/glslang/MachineIndependent/Scan.h
-- Installing: /usr/local/include/glslang/MachineIndependent/ScanContext.h
-- Installing: /usr/local/include/glslang/MachineIndependent/SymbolTable.h
-- Installing: /usr/local/include/glslang/MachineIndependent/Versions.h
-- Installing: /usr/local/include/glslang/MachineIndependent/parseVersions.h
-- Installing: /usr/local/include/glslang/MachineIndependent/propagateNoContraction.h
-- Installing: /usr/local/include/glslang/MachineIndependent/preprocessor/PpContext.h
-- Installing: /usr/local/include/glslang/MachineIndependent/preprocessor/PpTokens.h
-- Installing: /usr/local/lib64/libOSDependent.a
-- Installing: /usr/local/lib64/libOGLCompiler.a
-- Installing: /usr/local/lib64/libSPIRV.a
-- Installing: /usr/local/include/glslang/SPIRV/bitutils.h
-- Installing: /usr/local/include/glslang/SPIRV/spirv.hpp
-- Installing: /usr/local/include/glslang/SPIRV/GLSL.std.450.h
-- Installing: /usr/local/include/glslang/SPIRV/GLSL.ext.EXT.h
-- Installing: /usr/local/include/glslang/SPIRV/GLSL.ext.KHR.h
-- Installing: /usr/local/include/glslang/SPIRV/GlslangToSpv.h
-- Installing: /usr/local/include/glslang/SPIRV/hex_float.h
-- Installing: /usr/local/include/glslang/SPIRV/Logger.h
-- Installing: /usr/local/include/glslang/SPIRV/SpvBuilder.h
-- Installing: /usr/local/include/glslang/SPIRV/spvIR.h
-- Installing: /usr/local/include/glslang/SPIRV/doc.h
-- Installing: /usr/local/include/glslang/SPIRV/SpvTools.h
-- Installing: /usr/local/include/glslang/SPIRV/disassemble.h
-- Installing: /usr/local/include/glslang/SPIRV/GLSL.ext.AMD.h
-- Installing: /usr/local/include/glslang/SPIRV/GLSL.ext.NV.h
-- Installing: /usr/local/include/glslang/SPIRV/SPVRemapper.h
-- Up-to-date: /usr/local/include/glslang/SPIRV/doc.h
-- Installing: /usr/local/lib64/libHLSL.a

It would be good if SHADERed could be installed system-wide using CMake. This would make it easier to integrate it into Linux distributions or Flatpak.

Make clearing RenderTexture optional

As the title suggests, Render Textures are cleared every frame which usually is the desired behavior but doesn't allow for effects that accumulate or blend across multiple frames.

sharing possibilities: video, .cpp

Hi,

Just wanted to say I like where this project is going.
It kindof fills my gap between my blender-usage (modeling a scene) & kodelife-usage (shader-editing).
I checked the TODO.md and noticed many interesting features.
Concerning the sharing possibilities (video, .cpp), it could be handy to prioritize implementation like this:

  1. export image frames (render00001.png, so ffmpeg can encode it to any videoformat)
  2. export video
  3. export .cpp

REASON video is so easy to share across social media, it could help in popularizing SHADERed.

IDE force close after bad shader

I tried to modify the example cube and when I tried to save/render and the IDE force close without warning.
Where is the code I used :
(I know the code is bad)

#version 330

in vec4 color;
out vec4 outColor;

void main() {
   outColor = vec4(color);
   outColor = vec3(color); // This crash the ide
}

Tested with version 1.3 and 1.24, 32 and 64 bits on Windows 10.
Here my log file

log.txt

'player'-mode

Hi, I was wondering if SHADERed could be launched in zero/minimal UI 'player'-mode.
Is this possible thru theming the .ini file?

If not, I would like to suggest a simple 'player_mode' flag in the .ini file, or as a commandline flag.

That way you could start up a patch in 'player' mode.
Not sure how you would toggle back to edit-mode (maybe a button or keyboard shortcut?)

make error (glm)

Ubuntu 18.04 make fails

/home/martin/apps/SHADERed/UI/CubemapPreview.cpp: In member function ‘void ed::CubemapPreview::Draw(GLuint)’:
/home/martin/apps/SHADERed/UI/CubemapPreview.cpp:141:26: error: ‘ortho’ is not a member of ‘glm’
glm::mat4 matVP = glm::ortho(0.0f, m_w, m_h, 0.0f);
^~~~~
/home/martin/apps/SHADERed/UI/CubemapPreview.cpp:142:25: error: ‘translate’ is not a member of ‘glm’
glm::mat4 matW = glm::translate(glm::mat4(1.0f), glm::vec3(m_w/2, m_h/2, 0.0f));
^~~~~~~~~

Add support for display scaling (HiDPI)

The editor is currently unusable on high-resolution screens. Here's a cropped screenshot from a UHD monitor with 250% UI scaling applied at system level.

Annotation 2019-07-03 144158

Different Render Texture formats

There doesn't seem to be a way to change the format of a render texture right now. Other formats are sometimes better suited or even required for effects to work. For example, this is needed when working with HDR rendering or buffers that require high precision.

On the graphics API side there's a lot of formats available, while the support on different platforms or older GPUs is probably hit or miss. As possible additions I suggest the 16 and 32 bit float variants with 4 channels (for example DXGI_FORMAT_R16G16B16A16_FLOAT/DXGI_FORMAT_R32G32B32A32_FLOAT in DirectX). These should be widely supported and offer a high precision & range, allowing for a wide range of use cases.

There are other interesting formats, too, which come into play when optimizing shaders but I'm not sure if this is worth the additional effort.

Edit: I just remembered there were some limitations in older APIs where using multiple rendertargets with different formats had drastic limitations. I'm not sure if SHADERed is also affected by this, which would make this feature pretty difficult to implement.

Post your themes here

I would like to change SHADERed's default theme and even add or replace some themes that the program comes with.

Post your themes, suggestions & screenshots here.

EDIT: please open a new issue for bugs and questions related to the themes!

Undefined references building in Arch Linux

Hello, I am having the following problem trying to make this application (I'm using Manjaro/Arch Linux)
After executing cmake . I got:

-- Found SFML 2.5.1 in /usr/lib64/cmake/SFML
-- Google Mock was not found - tests based on that will not build
-- spirv-tools not linked - illegal SPIRV may be generated for HLSL
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cmoralesmx/git/SHADERed

Then, make works as expected until it reaches main.cpp.o
An abreviated copy and paste of the log follows

[100%] Linking CXX executable bin/SHADERed
/usr/bin/ld: CMakeFiles/SHADERed.dir/main.cpp.o: in function setIcon(SDL_Window*)': main.cpp:(.text+0x185): undefined reference to SDL_CreateRGBSurfaceWithFormatFrom'
/usr/bin/ld: main.cpp:(.text+0x26c): undefined reference to SDL_SetWindowIcon' /usr/bin/ld: main.cpp:(.text+0x278): undefined reference to SDL_FreeSurface'
/usr/bin/ld: CMakeFiles/SHADERed.dir/main.cpp.o: in function main': main.cpp:(.text+0x738): undefined reference to SDL_Init'

A larger version of the log is available in this pastebin

Any help would be greatly appreciated. Thanks

Code Selection With Keyboard In win10 bug

How to reproduce: shift+ctrl+→ selects several words, and with shift+ctrl still holding, press ←.
Issue: the cursor goes back while the selection doesn't.
image
By the way, this software is what I want for months. What I want is a light-weight IDE to write shader and have some meshes to see the result immediately and this software meets my needs perfectly. Well done.

Deleting an item from the last pass deletes the item in the previous

I have 3 passes. In those 3 passes I have a Render State and a Screen Quad. If I right-click on the last pass elements, I see double entries. The last entries do nothing when I click on them. If I delete the item using the first entry, both the last pass and the previous pass have their items deleted!

Untitled

Support for Vulkan GLSL syntax

In vulkan, shader inputs have to have a location(set = X, binding = Y) uniform ... to specify where everything is. Currently SHADERed simply ignores these and doesn't let you use them in variables.

It would be very handy to be able to use this program for shader dev, but right now I have to modify my shaders so much its hard to justify.

It shouldn't be too big of a change, vulkan glsl isn't that different. It just has additional requirements that opengl doesn't.

multiple render texture tutorial

It would be helpful if there was a tutorial on how to set up a set of passes that use multiple texture targets. I have a project that spits out 2 textures: the scene and the brightness colors. I'm trying to do a simple bloom program. I can see the output textures fine from my first pass but I can't use just those textures in the next pass without geometry.

EDIT: it seems multiple texture targets is working but I cannot seem to use a ScreenQuad for rendering to the window. I can use any other 3D geometry to see my results but I need it to be a ScreenQuad for post-processing effects

OpenGL port

I have just pushed a commit which includes a complete recode of the program (+ some new features ;) )

Though, there are some things that are currently broken:

  • HLSL geometry shaders
    • Not sure if this is my bug or theirs bug, or if HLSL geometry shaders now have to be coded in a specific way. A problem that I have stumbled upon is that it is quite impossible to send a variable (through output) from vertex shader to geometry shader. I think this is the issue: link but apparently it seems fixed (?).
  • MatrixReflect and MatrixShadow system variables currently do nothing and need to be reimplemented
    • glm, unlike DirectXMath, doesnt have a simple function to generate such matrices - so for now they will stay removed
  • CMake adds unnecessary parts of the glslang to the build pipeline
    • glslang-default-resource-limits, SPVRemapper, glslangValidator, spirv-remap executables are being built even though they are not used anywhere...

Please report all the bugs that you stumble upon! :D

Yes, No, Cancel buttons in dialogs could be always in view

image

image

I think it makes sense to have the buttons in the modal dialogs always visible (on a separate button bar) and just to scroll the contents. I think that's more natural, intuitive and just looks better. Also not all dialogs should be resizable.

Crashes on start in Manjaro Linux with i3 desktop

There's a segfault on line 574 of GUIManager.cpp where it says
if (needsUpdate[ind])
I think this is happening on the very first frame or two, and it appears that that needsUpdate is empty at this point, and it's trying to dereference element 0 anyway.
Not sure why this is happening (I haven't fully understood your codebase yet, but I'm working on it). Any ideas?

Support for more vertex attributes (e.g. tangents, binormals)

First of all, great tool!

As far as I can tell, it only supports a limited set of per-vertex attributes, though: Positions, normals and one set of texture coordinates.

I tried implementing a simple normal mapping shader, which requires tangent and binormal vectors for each vertex. Using the HLSL shader semantics for tangents and binormals did not work, though - the float3 vectors were all 0.

The tool also does not seem to respect the semantics in my HLSL shader at all, it always stores position in the first attribute, normals in the second attribute and texture coordinate in the thrid. E.g.

struct VSInput { float3 Position : POSITION; float2 TexCoord : TEXCOORD0; float3 Normal : NORMAL; };

This does not work as expected: "TexCoord" will contain the normal instead and "Normal" will contain texture coordinates.

It would be nice if we could configure the vertex attributes that are supplied to the shader, including ones that are not supported right now (e.g. tangents, binormals, vertex color or multiple sets of texture coordinates).

(if there is a way to do that, already, I haven't found it)

SHADERed: libs/imgui/imgui.cpp:13339: void ImGui::DockNodeTreeUpdatePosSize(ImGuiDockNode*, ImVec2, ImVec2, bool): Assertion `child_0->SizeRef[axis] > 0.0f && child_1->SizeRef[axis] > 0.0f' failed.

It is quite simple to cause a crash on Arch Linux, 9203f37

(Sorry, I cannot test other platforms.)

I retrieved this backtrace by telling cmake to build as:

cmake -DCMAKE_CXX_FLAGS="-g -O0" -GNinja . && ninja

Then running gdb.

Steps to reproduce:

  1. Open SHADERed
  2. Resize default Preview, cube changes size
  3. Open a previously saved project
  4. In the «Pipeline», right click «Simple», then «Edit Code→All».
[Thread 0x15553c28c700 (LWP 8565) exited]
[Thread 0x155514d0d700 (LWP 8574) exited]
[Thread 0x15553c68e700 (LWP 8563) exited]
[Thread 0x15553c48d700 (LWP 8564) exited]
[Thread 0x15551510f700 (LWP 8572) exited]
[Thread 0x15553ca90700 (LWP 8561) exited]
[Thread 0x15553cc91700 (LWP 8560) exited]
[Thread 0x155515511700 (LWP 8570) exited]
[Thread 0x155514f0e700 (LWP 8573) exited]
[Thread 0x155515310700 (LWP 8571) exited]
SHADERed: libs/imgui/imgui.cpp:13339: void ImGui::DockNodeTreeUpdatePosSize(ImGuiDockNode*, ImVec2, ImVec2, bool): Assertion `child_0->SizeRef[axis] > 0.0f && child_1->SizeRef[axis] > 0.0f' failed.

Thread 1 "SHADERed" received signal SIGABRT, Aborted.
0x0000155552fb9f25 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x0000155552fb9f25 in raise () at /usr/lib/libc.so.6
#1  0x0000155552fa3897 in abort () at /usr/lib/libc.so.6
#2  0x0000155552fa3767 in _nl_load_domain.cold () at /usr/lib/libc.so.6
#3  0x0000155552fb2526 in  () at /usr/lib/libc.so.6
#4  0x0000555555c433aa in ImGui::DockNodeTreeUpdatePosSize(ImGuiDockNode*, ImVec2, ImVec2, bool)
    (node=0x555556423310, pos=..., size=..., only_write_to_marked_nodes=true) at libs/imgui/imgui.cpp:13339
#5  0x0000555555c46287 in ImGui::DockContextBindNodeToWindow(ImGuiContext*, ImGuiWindow*) (ctx=0x5555566d76b0, window=0x5555587bfe00) at libs/imgui/imgui.cpp:14160
#6  0x0000555555c46486 in ImGui::BeginDocked(ImGuiWindow*, bool*) (window=0x5555587bfe00, p_open=0x555556475f80) at libs/imgui/imgui.cpp:14202
#7  0x0000555555c269db in ImGui::Begin(char const*, bool*, int) (name=0x55555b0299b0 "Simple (PS)###code_viewPS0", p_open=0x555556475f80, flags=1024)
    at libs/imgui/imgui.cpp:5765
#8  0x0000555555b0a740 in ed::CodeEditorUI::Update(float) (this=0x5555562ddab0, delta=0.00066000002) at UI/CodeEditorUI.cpp:78
#9  0x0000555555a04a97 in ed::GUIManager::Update(float) (this=0x7fffffffd240, delta=0.00066000002) at GUIManager.cpp:827
#10 0x00005555559f0d46 in ed::EditorEngine::Update(float) (this=0x7fffffff8db0, delta=0.00066000002) at EditorEngine.cpp:30
#11 0x00005555559e7cff in main(int, char**) (argc=1, argv=0x7fffffffe4e8) at main.cpp:281
(gdb) frame 4
#4  0x0000555555c433aa in ImGui::DockNodeTreeUpdatePosSize (node=0x555556423310, pos=..., size=..., only_write_to_marked_nodes=true) at libs/imgui/imgui.cpp:13339
13339	           IM_ASSERT(child_0->SizeRef[axis] > 0.0f && child_1->SizeRef[axis] > 0.0f);
(gdb) list
13334	       else if (child_1->WantLockSizeOnce)
13335	       {
13336	           child_1->WantLockSizeOnce = false;
13337	           child_1_size[axis] = child_1->SizeRef[axis] = child_1->Size[axis];
13338	           child_0_size[axis] = child_0->SizeRef[axis] = (size_avail - child_1_size[axis]);
13339	           IM_ASSERT(child_0->SizeRef[axis] > 0.0f && child_1->SizeRef[axis] > 0.0f);
13340	       }
13341	
13342	       // 3) If one window is the central node (~ use remaining space, should be made explicit!), use explicit size from the other, and remainder for the central node
13343	       else if (child_1->IsCentralNode() && child_0->SizeRef[axis] != 0.0f)
(gdb) p child_0
$1 = (ImGuiDockNode *) 0x5555567a91a0
(gdb) p child_1
$2 = (ImGuiDockNode *) 0x5555566e1c40
(gdb) p *child_0
$3 = {ID = 7, SharedFlags = 0, LocalFlags = 0, ParentNode = 0x555556423310, ChildNodes = {0x5555566e1ac0, 0x5555566e1b80}, Windows = {Size = 0, Capacity = 0, 
    Data = 0x0}, TabBar = 0x0, Pos = {x = 0, y = 0}, Size = {x = 0, y = 0}, SizeRef = {x = -2, y = 915}, SplitAxis = 1, WindowClass = {ClassId = 0, 
    ParentViewportId = 0, ViewportFlagsOverrideSet = 0, ViewportFlagsOverrideClear = 0, DockingAlwaysTabBar = false, DockingAllowUnclassed = true}, 
  State = ImGuiDockNodeState_Unknown, HostWindow = 0x555556796080, VisibleWindow = 0x0, CentralNode = 0x0, OnlyNodeWithWindows = 0x0, LastFrameAlive = 314008, 
  LastFrameActive = 314008, LastFrameFocused = -1, LastFocusedNodeID = 0, SelectedTabID = 0, WantCloseTabID = 0, AuthorityForPos = 0, AuthorityForSize = 0, 
  AuthorityForViewport = 0, IsVisible = true, IsFocused = false, HasCloseButton = false, HasWindowMenuButton = false, EnableCloseButton = false, 
  WantCloseAll = false, WantLockSizeOnce = false, WantMouseMove = false, WantHiddenTabBarUpdate = false, WantHiddenTabBarToggle = false, 
  MarkedForPosSizeWrite = true}
(gdb) p *child_1
$4 = {ID = 8, SharedFlags = 0, LocalFlags = 0, ParentNode = 0x555556423310, ChildNodes = {0x5555566e1d00, 0x5555566e1dc0}, Windows = {Size = 0, Capacity = 0, 
    Data = 0x0}, TabBar = 0x0, Pos = {x = 2387, y = 36}, Size = {x = 1453, y = 1988}, SizeRef = {x = 1453, y = 915}, SplitAxis = 0, WindowClass = {ClassId = 0, 
    ParentViewportId = 0, ViewportFlagsOverrideSet = 0, ViewportFlagsOverrideClear = 0, DockingAlwaysTabBar = false, DockingAllowUnclassed = true}, 
  State = ImGuiDockNodeState_Unknown, HostWindow = 0x555556796080, VisibleWindow = 0x0, CentralNode = 0x0, OnlyNodeWithWindows = 0x0, LastFrameAlive = 314008, 
  LastFrameActive = 314008, LastFrameFocused = -1, LastFocusedNodeID = 0, SelectedTabID = 0, WantCloseTabID = 0, AuthorityForPos = 0, AuthorityForSize = 0, 
  AuthorityForViewport = 0, IsVisible = true, IsFocused = false, HasCloseButton = false, HasWindowMenuButton = false, EnableCloseButton = false, 
  WantCloseAll = false, WantLockSizeOnce = false, WantMouseMove = false, WantHiddenTabBarUpdate = false, WantHiddenTabBarToggle = false, 
  MarkedForPosSizeWrite = false}

I think this is the problem:

(gdb) p child_0->SizeRef
$5 = {x = -2, y = 915}
(gdb) p child_1->SizeRef
$6 = {x = 1453, y = 915}

x is -2.

Of course, turning off the assertions fixes the problem as a stopgap measure, but I doubt this is the right solution so won't open a PR with it.

diff --git a/imgui.cpp b/imgui.cpp
index 92af81d0..6d07562d 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -13336,7 +13336,7 @@ void ImGui::DockNodeTreeUpdatePosSize(ImGuiDockNode* node, ImVec2 pos, ImVec2 si
             child_1->WantLockSizeOnce = false;
             child_1_size[axis] = child_1->SizeRef[axis] = child_1->Size[axis];
             child_0_size[axis] = child_0->SizeRef[axis] = (size_avail - child_1_size[axis]);
-            IM_ASSERT(child_0->SizeRef[axis] > 0.0f && child_1->SizeRef[axis] > 0.0f);
+            //IM_ASSERT(child_0->SizeRef[axis] > 0.0f && child_1->SizeRef[axis] > 0.0f);
         }
 
         // 3) If one window is the central node (~ use remaining space, should be made explicit!), use explicit size from the other, and remainder for the central node
@@ -14156,7 +14156,7 @@ static ImGuiDockNode* ImGui::DockContextBindNodeToWindow(ImGuiContext* ctx, ImGu
             if (ancestor_node->ParentNode)
                 ancestor_node = ancestor_node->ParentNode;
         }
-        IM_ASSERT(ancestor_node->Size.x > 0.0f && ancestor_node->Size.y > 0.0f);
+        //IM_ASSERT(ancestor_node->Size.x > 0.0f && ancestor_node->Size.y > 0.0f);
         DockNodeTreeUpdatePosSize(ancestor_node, ancestor_node->Pos, ancestor_node->Size, true);
     }
 
@@ -14244,7 +14244,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open)
     // We can have zero-sized nodes (e.g. children of a small-size dockspace)
     IM_ASSERT(node->HostWindow);
     IM_ASSERT(node->IsLeafNode());
-    IM_ASSERT(node->Size.x >= 0.0f && node->Size.y >= 0.0f);
+    //IM_ASSERT(node->Size.x >= 0.0f && node->Size.y >= 0.0f);
     node->State = ImGuiDockNodeState_HostWindowVisible;
 
     // Undock if we are submitted earlier than the host window

Use CMake

Remove the Visual Studio projects and add a CMake build. This allows cross platform compilation.
I'd be willing to contribute that if accepted

No useful error messages show up with the auto recompile feature when editing HLSL and Vulkan GLSL shaders

Why?
ShaderTranscompiler::TranscompileSource() (it is also worth mentioning that this function runs in a separate thread) adds the actual (useful) error messages to the message output window. Those messages then get deleted few moments later in the RenderEngine::RecompileFromSource() method which calls MessageStack::ClearGroup() method.

Actual error messages are being shown when using pure GLSL shaders because for GLSL shaders the messages are being generated from the RenderEngine's RecompileFromSource method after the ClearGroup call.

Can't erase text in the code editor when holding Shift

  • Operating system: Fedora 31
  • SHADERed version: Git 624e77c

In the code editor, I can't erase text using Shift + Delete or Shift + Backspace. In comparison, this works in most other text editors out there. Solving this would make the built-in editor more consistent with other editors.

Note that this doesn't apply to other GUI fields, only the code editor.

Crash on certain shader inputs

I recently updated my version of shadered (I think I skipped 2 or 3 releases) and can't open one of my projects anymore. It seems like the shader input layout is giving it trouble (alignment issue?) but the log output doesn't hint at anything specific.

You can reproduce it by using this input layout (hlsl):

cbuffer cbPerFrame : register(b0)
{
	float4x4 matGeo;
	float4x4 matVP;
	float4x4 matGeoLast;
	float4x4 matVPLast;
	int frame;
	float2 viewport;
	float4x4 matVInv;
};

libShaderDebugger link error

Hi!
I'm trying to build the latest git on arch linux. It used to work well last time I tried (mid january) but now it look like libShaderDebugger fails to link.

Here is the full error :

[100%] Linking CXX executable bin/SHADERed
/usr/bin/ld : libs/ShaderDebugger/libShaderDebugger.a(CommonLibrary.cpp.o) : in function « sd::Common::lib_common_fma(bv_program_s*, unsigned char, bv_variable_s*) » :
CommonLibrary.cpp:(.text+0x61bf) : undefined reference to « glm::vec<4, float, (glm::qualifier)0> glm::fma<glm::vec<4, float, (glm::qualifier)0> >(glm::vec<4, float, (glm::qualifier)0> const&, glm::vec<4, float, (glm::qualifier)0> const&, glm::vec<4, float, (glm::qualifier)0> const&) »
collect2: erreur: ld a retourné le statut de sortie 1
make[2]: *** [CMakeFiles/SHADERed.dir/build.make:1144 : bin/SHADERed] Erreur 1

CommonLibrary.cpp, line 1445, glm::vec4 vecData = glm::fma(a, b, c); doesn't seem to accept glm::vec4 as parameters, I don't know why, but by commenting the first instance of glm::fma() the program build and run fine. I am running glm 0.9.9.7.

New export feature: Having `iMouse` variable causes build failure

[fred@pc zhecpp]$ make
Scanning dependencies of target ZHECPP
[ 50%] Building CXX object CMakeFiles/ZHECPP.dir/export.cpp.o
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp: In function ‘int main()’:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: error: no matching function for call to ‘value_ptr()’
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.hpp:65:53: note: candidate: ‘template<class genType> const typename genType::value_type* glm::value_ptr(const genType&)’
   65 |  GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const& v);
      |                                                     ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.hpp:65:53: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:11:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::vec<2, T, Q>&)’
   11 |  GLM_FUNC_QUALIFIER T const* value_ptr(vec<2, T, Q> const& v)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:11:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:17:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::vec<2, T, Q>&)’
   17 |  GLM_FUNC_QUALIFIER T* value_ptr(vec<2, T, Q>& v)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:17:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:23:31: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::vec<3, T, Q>&)’
   23 |  GLM_FUNC_QUALIFIER T const * value_ptr(vec<3, T, Q> const& v)
      |                               ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:23:31: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:29:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::vec<3, T, Q>&)’
   29 |  GLM_FUNC_QUALIFIER T* value_ptr(vec<3, T, Q>& v)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:29:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:35:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::vec<4, T, Q>&)’
   35 |  GLM_FUNC_QUALIFIER T const* value_ptr(vec<4, T, Q> const& v)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:35:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:41:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::vec<4, T, Q>&)’
   41 |  GLM_FUNC_QUALIFIER T* value_ptr(vec<4, T, Q>& v)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:41:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:47:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<2, 2, T, Q>&)’
   47 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 2, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:47:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:53:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<2, 2, T, Q>&)’
   53 |  GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 2, T, Q>& m)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:53:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:59:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<3, 3, T, Q>&)’
   59 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 3, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:59:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:65:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<3, 3, T, Q>&)’
   65 |  GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 3, T, Q>& m)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:65:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:71:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<4, 4, T, Q>&)’
   71 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 4, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:71:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:77:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<4, 4, T, Q>&)’
   77 |  GLM_FUNC_QUALIFIER T* value_ptr(mat<4, 4, T, Q>& m)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:77:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:83:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<2, 3, T, Q>&)’
   83 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 3, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:83:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:89:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<2, 3, T, Q>&)’
   89 |  GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 3, T, Q>& m)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:89:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:95:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<3, 2, T, Q>&)’
   95 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 2, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:95:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:101:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<3, 2, T, Q>&)’
  101 |  GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 2, T, Q>& m)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:101:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:107:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<2, 4, T, Q>&)’
  107 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 4, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:107:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:113:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<2, 4, T, Q>&)’
  113 |  GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 4, T, Q>& m)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:113:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:119:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<4, 2, T, Q>&)’
  119 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 2, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:119:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:125:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<4, 2, T, Q>&)’
  125 |  GLM_FUNC_QUALIFIER T* value_ptr(mat<4, 2, T, Q>& m)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:125:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:131:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<3, 4, T, Q>&)’
  131 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 4, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:131:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:137:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<3, 4, T, Q>&)’
  137 |  GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 4, T, Q>& m)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:137:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:143:30: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::mat<4, 3, T, Q>&)’
  143 |  GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 3, T, Q> const& m)
      |                              ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:143:30: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:149:25: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::mat<4, 3, T, Q>&)’
  149 |  GLM_FUNC_QUALIFIER T * value_ptr(mat<4, 3, T, Q>& m)
      |                         ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:149:25: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:155:31: note: candidate: ‘template<class T, glm::qualifier Q> const T* glm::value_ptr(const glm::qua<T, Q>&)’
  155 |  GLM_FUNC_QUALIFIER T const * value_ptr(qua<T, Q> const& q)
      |                               ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:155:31: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

In file included from /usr/include/glm/gtc/type_ptr.hpp:230,
                 from /home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:14:
/usr/include/glm/gtc/type_ptr.inl:161:24: note: candidate: ‘template<class T, glm::qualifier Q> T* glm::value_ptr(glm::qua<T, Q>&)’
  161 |  GLM_FUNC_QUALIFIER T* value_ptr(qua<T, Q>& q)
      |                        ^~~~~~~~~
/usr/include/glm/gtc/type_ptr.inl:161:24: note:   template argument deduction/substitution failed:
/home/fred/Workspace/SHADERed/bin/zhecpp/export.cpp:417:77: note:   candidate expects 1 argument, 0 provided
  417 | formLocation(Simple_SP, "iMouse"), 1, glm::value_ptr());
      |                                                      ^

make[2]: *** [CMakeFiles/ZHECPP.dir/build.make:63: CMakeFiles/ZHECPP.dir/export.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/ZHECPP.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
[fred@pc zhecpp]$ cd ..

Removing the variable fixes the issue.

libassimp

Hi,

Linux ubuntu (xenial) user here.
This project looks very interesting!
So I ran:

$ sudo apt install libsdl2-dev libsfml-dev libglew-dev libglm-dev libassimp-dev libgtk-3-dev

However I got:

Screenshot from 2019-09-21 10-11-20

Some more info:

[sqz@localhost~]  $ cat /etc/issue 
Ubuntu 16.04.6 LTS \n \l

[sqz@localhost~]  $ find /usr/lib |grep assimp
/usr/lib/x86_64-linux-gnu/libassimp.so
/usr/lib/x86_64-linux-gnu/pkgconfig/assimp.pc
/usr/lib/x86_64-linux-gnu/libassimp.so.3
/usr/lib/x86_64-linux-gnu/cmake/assimp-3.2
/usr/lib/x86_64-linux-gnu/cmake/assimp-3.2/assimp-config.cmake
/usr/lib/x86_64-linux-gnu/cmake/assimp-3.2/assimp-config-version.cmake
/usr/lib/x86_64-linux-gnu/libassimp.so.3.2.0

[sqz@localhost~]  $ apt-cache search assimp
assimp-utils - 3D model import library (utilities)
libapache2-authcassimple-perl - Apache2 module to authenticate trough a CAS server
libassimp-dev - 3D model import library (development)
libassimp-doc - 3D model import library (documentation)
libassimp3v5 - 3D model import library
python-pyassimp - 3D model import library (Python bindings)
qt3d-assimpsceneparser-plugin - Qt 3D GL Transmission Format scene parser plugin

Next week I will pick up my new windows 10 laptop.
Will that be easier to run without OS plumbing?

Add a way to save supersampled screenshots

Rendering screenshots in an higher resolution then downscaling them makes it possible to achieve supersampling, which greatly enhances visual quality. This could be done by adding a "Supersampling" field to the Render menu which could accept 3 values (1×, 2× and 4×).

For instance, if you set the resolution to 1920×1080 and use 2× supersampling, the viewport would be rendered as 3840×2160 and the resulting image would be downscaled by 50% using cubic (or linear) interpolation. The image would then be saved on the filesystem.

It can already be done manually using an image editor, but having this built-in would make it easier to use.

Variable Manager dialog assumes HLSL, even on Linux

At first I thought this was just some kind of shorthand, but it turns out that these are HLSL variable types. I know that this program supports DirectX also (@dfranx doesn't share my disdain for proprietary APIs), but on Linux, and Windows under OpenGL, (if that's possible,) it should not use the HLSL types.
2020-01-19-185534_1259x432_scrot

Writing two projects in the same directory overwrites their shaders!!!

Consider a directory with two projects...A.sprj and B.sprj.

SHADERed by default saves its GLSL files as shaders/SimplePS.glsl and shaders/SimpleVS.glsl.

Meaning you cannot have two projects in the same directory! You will silently overwrite your other project!

I lost my zhe.sprj!!! :-( Luckily I had it backed up partially on the Medium post I wrote about it, but this is very sad and could have turned out very badly for me.

Shared shader files do not refresh changes

If I'm using the same shader for 3 different passes, and I edit the shader in one of the pass's text editor, it will not refresh changes on the other open passes. I have to manually close and re-open that pass's shader text editor to see that my changes are in fact shared because they point to the same file.

App crashes when a new shader pass is created

On a new project
When I try to create the first shader pass, I input a name for it, I select the PS and VS file paths for it and I Input the PS and VS entry. When I click OK the app crashes.
The same happens if I only input the name.

On an existing project
When I try to create a new shader pass, the pass is created but if I double click on it the app crashes.

Add a vector-based application icon

While working on #37, I noticed the repository only contains a 64×64 icon. This isn't a huge issue, but it can be nice to have larger icons for display on software app stores and the like.

@dfranx Do you have a vector source file for the icon? We could add it to the repository (preferably as a SVG). This way, we can generate higher-resolution variants when needed 🙂

[feature request] ShaderToy Mode

This project is really impressive! I always want to find a real-time shader testing software, and here I found it!

I hope this software can have a ShaderToy Mode that can run ShaderToy codes directly in the software without tweaking. It will be beneficial to the user if the shader is too laggy in the browser or if the user simply wants to play around with the shader locally.

Thank you for bringing us this awesome shader software!

Whole computer slows down while the program is open

I'm trying out SHADERed on an old(er) laptop with intel graphics, unfortunately on the simplest examples I can't do much on the computer while alt tabbed because it uses as much CPU time as possible (apparently). Setting the framecap to 60 didn't solve it.

Edit: after posting the issue I tried setting the vsync instead, it seems better but still taking a bit more cpu time than I'd like (for being minimized). I can't seem to be able todelete the issue so I'll leave it since it could be a legitimate issue still.

SHADERed fails to start after being installed system-wide on Linux

When starting SHADERed from the system-wide installed binary, I get the following error message:

terminate called after throwing an instance of 'ghc::filesystem::filesystem_error'
  what():  No such file or directory: './plugins/'
[1]    23821 abort (core dumped)  shadered

This doesn't occur if running the SHADERed binary in the bin/ folder.
This seems to be a known issue judging by this file, but I thought it'd be a good idea create an issue for reference 🙂

GLSL shaders on the weaker/older GPUs

When loading a GLSL project (for example GLSLsimple project) on weaker/older GPUs it is completely blank and no object is being rendered... I am currently not sure what causes this issue as both the built-in shaders for gizmo/bounding box work normally and the HLSL shaders, which are being translated to GLSL, also work normally... The GLSLsimple is blank on my laptop when running with the integrated Intel HD GPU, but it isn't blank when running with the dedicated NVIDIA GTX 840M... HLSL shaders work with both GPUs!! I am currently uncertain what causes this issue so please if you have any ideas/fixes respond here..

Compiling on mac

Has anyone successfully compiled on mac? I can kind of get to here but its having some trouble when trying to locate assimp. Ive installed assimp through brew.

...
[100%] Linking CXX executable bin/SHADERed
ld: library not found for -lassimp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/SHADERed] Error 1
make[1]: *** [CMakeFiles/SHADERed.dir/all] Error 2
make: *** [all] Error 2
$ ls -la /usr/local/lib/libassimp*
lrwxr-xr-x 48 christian 26 Dec  0:13 /usr/local/lib/libassimp.5.0.0.dylib -> ../Cellar/assimp/5.0.0/lib/libassimp.5.0.0.dylib
lrwxr-xr-x 44 christian 26 Dec  0:13 /usr/local/lib/libassimp.5.dylib -> ../Cellar/assimp/5.0.0/lib/libassimp.5.dylib
lrwxr-xr-x 42 christian 26 Dec  0:13 /usr/local/lib/libassimp.dylib -> ../Cellar/assimp/5.0.0/lib/libassimp.dylib
lrwxr-xr-x 42 christian 26 Dec 11:49 /usr/local/lib/libassimp.dylib.5 -> ../Cellar/assimp/5.0.0/lib/libassimp.dylib

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.