Jump to content

SpiderPig

Members
  • Posts

    2,348
  • Joined

  • Last visited

Everything posted by SpiderPig

  1. Did a fresh install of 1.0.2, created a new project, built in release and got the same error. VS2022 is up to date. v17.6.2? Microsoft Visual Studio Community 2022 Version 17.6.2 VisualStudio.17.Release/17.6.2+33723.286 Microsoft .NET Framework Version 4.8.04084 Installed Version: Community Visual C++ 2022 00482-90000-00000-AA189 Microsoft Visual C++ 2022
  2. This is with a new project as well as my old ones and VS is up to date. I'll try a fresh install of Ultra.
  3. Nice! Been needing this lately.
  4. Debug mode is fine, but none of my projects compile in Release mode at the moment. I made a fresh project and that doesn't compile in Release mode either. I'm using the latest update. Apparently there is a version mismatch?
  5. Top stuff, it's coming along well!
  6. Wondering If you've had a chance to look at this yet? Been in Leadwerks for a bit and I'm keen to get back into Ultra!
  7. With VS22 I find I have to just restart the whole pc somtimes to get it too work. But most of the time a clean build or restart of the editor fixes it.
  8. I've seen similar issues. To start with they were mainly intellisense being stupid. I think it's getting better with each update though.
  9. @Josh I wonder if the ui->root should be transparent by default?
  10. I did a clean install of the latest update, I have the new client too. Clicking a project loads the editor in the task bar but it does not display. Hovering over the icon will show that it is a white window but there is no window visible. Loading it directly from Editor.exe does this too. The UltraEngine splash is also way off centre for me. I had these issues with the last version too. I had the assets editors working for a bit then they did the same thing, loaded into the taskbar but showed no window and was white on the preview.
  11. Thought I'd show off my node editor for Ultra Engine Shaders. Currently I'm developing it as I develop my game, so features get added as I need them. But I'd love to hear your feedback and if you'd like me to add something I'm sure I can oblige. Discord for ShaderMaster ShaderMaster_v1.3.zip Before use, you need to set the path to UltraEngine like this so it can find the tools and shaders. You will also need to copy 'FragmentCustom.glsl' to 'UltraEngine\Templates\Common\Source\Shaders\PBR' in order to use the fragment shader nodes. Then to create a new project go to File->New Project and enter in a name. PBR is the only available at the moment and you can choose PostEffect from the right drop down - but this has not been tested in some time! Feel free to explore it though. Add a file to the project by clicking the file icon with the '+'. Below are the files associated with one of my projects. Macros are also visible when the checkbox is checked. Macros are functions that can be used between projects. Create a function, right click the function file and choose 'Convert to Macro'. The function will be removed the current project and added to the macro folder. Choose a file type, this is either a shader stage or a function or definition. I've used the fragment shader extensively. I have used the vertex and geometry shaders though there may be bugs here. Please let me know. Tessellation and Compute stages aren't working yet. Select a file from the list on the right to open it and right click in the node area to get a menu of all the available nodes. I'll make in depth tutorials on this later if any one is interested as there's a lot more to cover. Right now it's there to play with. An example of the fragment shader for my voxel terrain.
  12. And the answer is : #include "../../../../../../../../UltraEngine/Templates/Common/Shaders\Base\Materials.glsl" Relatively speaking.
  13. I wanted to try and compile some shaders in a location away from the validator and the .glsl files. It compiles fine so long as I don't try to include anything in the shader. The BAT file; C:\UltraEngine\Tools\glslangValidator.exe "C:\_output\Test.frag" -V -o "C:\_output\Test.frag.spv" The Shader; #version 450 #extension GL_GOOGLE_include_directive : enable #extension GL_ARB_separate_shader_objects : enable #extension GL_EXT_multiview : enable //Compiles if this line is commented out #include "C:\UltraEngine\Templates\Common\Shaders\Base\Materials.glsl" layout(location = 0) out vec4 outColor; void main() { outColor = vec4(0.0f, 1.0f, 1.0f, 1.0f); } Does the validator only use relative paths somhow?
  14. I have found it. "OPAQUE": { "default": { "base": { "geometry": "Materials/Point.geom.spv", "fragment": "Materials/Point.frag.spv" }, "depthPass": { "geometry": "Materials/Point.geom.spv" } } }
  15. Ah yes that is the problem. Where does that go in the shader family JSON? { "shaderFamily": { "root": "Shaders/PBR.json", "static": { "float": { "OPAQUE": { "default": { "base": { "geometry": "Materials/Point.geom.spv", "fragment": "Materials/Point.frag.spv" } } }, "MASK": { "default": { "base": { } } } }, "double": { "OPAQUE": { "default": { "base": { } } }, "MASK": { "default": { "base": { } } } } } } }
  16. I've had no luck with this. When I add a geometry stage to the material family, it's fragment shader no longer works. The points seem to be showing the background color. I've got a simplified example here, it should move the verts a bit and they should be green. #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1440, 900, displays[0]); auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto camera = CreateCamera(world); camera->Move(0, 2, 0); camera->SetClearColor(1, 0, 0); auto light = CreateDirectionalLight(world); light->SetColor(5.0f); light->SetRotation(35, 35, 35); auto floor = CreateBox(world, 100.0f, 0.5f, 100.0f); auto model = CreateModel(world); auto mesh = model->AddMesh(MESH_POINTS); for (int z = 0; z < 100; z++) { for (int x = 0; x < 100; x++) { mesh->AddVertex((float)x / 10.0f - 5.0f, 1.0f, (float)z / 10.0f); } } model->UpdateBounds(); model->SetMaterial(LoadMaterial("Materials\\Point.mat")); while (window->KeyHit(KEY_ESCAPE) == false && window->Closed() == false) { world->Update(); world->Render(framebuffer); } return 0; } Materials.zip
  17. I deleted a few faces and remade them but still the same result. There are no double vertices and they appear to be correctly connected.
  18. This is just perplexing. The one on the left was made in blender, the right was exported from marching cubes. Both have flat shading. The left has a few more faces and vertices on the bevel, but, why the odd shading around the triangles on the right? TestCube.zip VoxelTerrain.zip
  19. I noticed this a while ago just briefly. Text area works but text field is not visible. The project is up to date. #include "UltraEngine.h" #include "ComponentSystem.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1440, 900, displays[0]); auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto camera = CreateCamera(world); camera->Move(0, 2, -3); camera->SetClearColor(1, 0, 0); auto light = CreateDirectionalLight(world); light->SetRotation(35, 35, 35); auto floor = CreateBox(world, 100.0f, 0.5f, 100.0f); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->size); ui->SetRenderLayers(2); ui->root->SetColor(0.0f, 0.0f, 0.0f, 0.0f); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->size.x * 0.5f, (float)framebuffer->size.y * 0.5f, 0); ui_camera->SetRenderLayers(2); ui_camera->SetClearMode(CLEAR_DEPTH); //auto text = CreateTextArea(0, 0, 512, 30, ui->root); auto text = CreateTextField(0, 0, 512, 30, ui->root); text->SetText("Hello Ultra"); while (window->KeyHit(KEY_ESCAPE) == false && window->Closed() == false) { while (PeekEvent()) { ui->ProcessEvent(WaitEvent()); } world->Update(); world->Render(framebuffer); } return 0; }
  20. Yeah that's a good idea. I briefly looked at getting normals from an SDF in a shader. I think it's just a few extra samples in some known directions... I will try this.
  21. I saw here I might need to do a better job at averaging the normals of shared vertices. It says to use the angle to determine the weight that each face's normal will effect the vertex. I tried with the dot product and seemed to get slightly better results but I'm unsure on exactly what the value of "Angle" in this answers code should be. Degrees maybe? or just 0 to 1? Is there a "proper" method of average normals for shared vertices? Usually I just add all the faces normals up that share the vertex and divided by total number of faces that share it. Might be half my problem.
×
×
  • Create New...