-
Posts
2,205 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by SpiderPig
-
-
This model's been exported from blender. Loading it in the editor crashes the program and loading it my game does the same. Haven't used this file in a while but it has worked before.
-
Awsome can't wait to test 😁
-
Thanks, I did this in BeginDispatch():
switch (hook) { case ComputeHook::RENDER: world->AddHook(HookID::HOOKID_RENDER, BeginComputeShaderDispatch, info, !oneTime); break; case ComputeHook::TRANSFER: world->AddHook(HookID::HOOKID_RENDER, BeginComputeShaderDispatch, info, !oneTime); break; }
It doesn't crash now and the cubes spin but remain pink.
-
Ah I see. Glad I asked before buying one, thanks
- 1
-
Thanks for the info. Dust is my main problem and I thought less fans meant less dust but I can see that might not be the case...
-
-
Hey guys, any one here have a water cooled rig? I'm thinking of doing mine as I'm tired of all the dust inside and on the fan inlets but don't know much about water cooling...
-
1 hour ago, Josh said:
In the immediate term, I recommend splitting your data up into multiple zip archives.
Yeah I'll do this for now. Thankyou.
-
Updated to v1.1. Release notes in download.
- 1
-
Would it be possible to see an added component affect the object it was added too in the editor? Like the Mover component, I add it and then change the rotation parameter and start seeing the object rotate. I can see how it could work for Lua components but maybe not C++ components. Anyway just a thought.
-
Yeah I didn't think so. I must have got confused somewhere along the line about what project I was using.
-
If I write a component in C++ how does it work with a LUA project without needing to be compiled by visual studio?
-
Tiny error in the example here. Resume() is not part of Thread.
-
Yes I've been called out with that one too. Glad it's fixed!
- 1
-
I can't see anything else wrong with your code but I'm no lua expert so I'm just rattling off things that might help now... world not null?
- 2
-
Have you checked to make sure start() is actually being called? Maybe a print or notify in there just to be sure that's not the issue?
-
2 minutes ago, Alienhead said:
-2,0
My first obvious observation. Might just be a typo in the post
-
While there is no viewer in the shader editor (probably will be once Ultra supports C#) you can create a file watcher in your application to watch the changes you make in real-time. Within a second or two
Add this at the start of your program.
auto watcher = CreateFileSystemWatcher("Materials");
And add this to your loop.
while (PeekEvent()) { auto ev = WaitEvent(); if (ev.id == EVENT_FILECHANGE or ev.id == EVENT_FILECREATE) { //Look for a loaded asset with this file path auto asset = FindCachedAsset(ev.text); if (asset) { //Reload the modified asset if (asset->As<Material>() != nullptr) { auto material = asset->As<Material>(); vector<shared_ptr<Texture>> textures; for (int id = 0; id < 16; id++) { auto tex = material->GetTexture(id); textures.push_back(tex); } asset->Reload(); //If you assign textures progmatically you need to do this to make sure the newly loaded material has them too. material = asset->As<Material>(); for (int id = 0; id < 16; id++) { material->SetTexture(textures[id], id); } } else { asset->Reload(); } } } }
You can also setup the shader project to automatically compile and export to multiple projects that may use it.
In 'Preferences' under 'Export Options' you can browse to any one of your Ultra projects and add them to the list. This list will be saved between any shader project. You then need to check which Ultra project you want the shader to be exported to and then check 'Auto Export' and 'Save'.
Every time the shader project is changed it will attempt to compile. If the compile is successful and 'Auto Export' is checked it will copy all relevant files over to each of the selected Ultra projects in the 'Materials' folder.
If 'Auto Export" is disabled, you can go to File->Export All.
This is mine.
If you have the code above running in your application and your app is running as you edit your shader, you should see it update as you make changes.
- 2
-
Updated start of the thread with a download to try.
-
-
Works perfectly thankyou!
-
On 1/10/2024 at 3:06 AM, Josh said:
This method must ONLY be called from a render hook. See World::AddHook.
I can't find this in the documentation.
-
intBitsToFloat()
Funny how simply making a post can make the answer show up on your next google search.
- 1
- 1
-
I have packed integers and floats into a texture to use in my shader. Information is packed into the texture by poking a buffer and then assigning that buffer to an RGBA texture. The following code extracts an integer from a texelFetch result in the fragment shader. It seems to work well.
int BytesToInteger( in vec4 pixel ) { return ( int( ( pixel.w * 255.0f ) ) << 24 ) | ( int( ( pixel.z * 255.0f ) ) << 16 ) | ( int( ( pixel.y * 255.0f ) ) << 8 ) | int( ( pixel.x * 255.0f ) ); }
However the same process does not work for floats and I'm sure there is a reason why but I can't figure it out. Any one know the answer?
float BytesToFloat( in vec4 pixel ) { return float( ( int( ( pixel.w * 255.0f ) ) << 24 ) | ( int( ( pixel.z * 255.0f ) ) << 16 ) | ( int( ( pixel.y * 255.0f ) ) << 8 ) | int( ( pixel.x * 255.0f ) ) ); }
Culling seems to get slow quickly
in Bug Reports
Posted
I literally just discovered this too. Was about to make a post.
EDIT : I can confirm also that it works as expected.