-
Posts
854 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by klepto2
-
-
Well, i understand why you may focus on other things currently, but both of your points are not truely valid.
1. not getting the correct error-line:
Might be a bit harder to implement, but keeping the original and processed code (maybe even with some metadata) a simple diff should already work. You should be able to register if an errorline is in the included part or not and be able to jump into the correct file.
2. impossible to reload?
Definetly not impossible, but might be a bit tricky. Short solution: ignore includes for the reload, just track saves for the main shader. I could live with that.
-
You can even access objects from the child or parent script:
self.parent.Script.somevalue = 1.0
-
+1
It will make life a lot easier. Specially in situation where a lot of different shaders needs same functions and constants. Currently it is damn hard to maintain constant changes between shaders.
-
Most posteffects will only be available through the current "Workshop" or later through the real steam workshop.
Currently only pure "*.shader" posteffects are supported via the in Editor option.
Some advanced effects will need multiple passes. Bloom for instance needs blurred and downsampled buffers which are prepared in the lua script. So while it may work with the in editor settings there might be issues which will be only resolved when lua posteffects are officially supported in the editor.
-
I recommend gDebugger (http://www.gremedy.com) Has a lot of options and is free.
- 1
-
If i see it correctly (I don't have Le installed here at work) its missing the shadow-shader.
Open the material editor and go to the shader tab.
Go the shadow shader and select the "shaders/shadow/shadow+animated.shader" Shader-file.
Save it and it should work.
-
Have you applied the "shadow+animated.shader" in the shadow slot of the material as well?
-
UDK makes the same as LE, but under the hood. UDK has a really advanced material-system which generates the shader on demand. Their material system is more or less a bunch of multiple scripts which are later compiled to the target shader language. (like the flowgraph in LE) Under the hood UDK as well has several (if not much much more ) predefined shader templates which are used depending if the model is animated, opaque or something completely different.
Could Leadwerks do the same? Yes, theoretically. To be honest i believe such a system needs a lot of manpower and time to make it stable and usable. (the things needs to be optimized, optional compilation pathes based on gpu, etc. ) So currently Leadwerks is going the easy and stable way, instead of delivering something unfinished which might be more complicated than the system right now.
PS: Leadwerks is not UDK and will never be.
- 2
-
Skinning is done in a shader because it is multiple times faster than on cpu.
Nearly any modern engine uses seperate shaders for skinned animation.
On most of them you might not notice it because they preparse shader code and use #define statements or other methods
to branch one shader into multiple ones.
This was the way LE2 did it. While it is easier for the enduser to just have one shader (sometimes called "ubershader" or "godshader") it is not that easy to implement the correct branching and parsing structure. Also you are mainly dependend from one shader and everything needs to be included in it. So just creating a eg. phong shader and share it with the community wouldn't be that easy.
- 1
-
They have just to be in different locations, not exactly the "Shaders"-Folder. I have several Shader folders and they work as intended.
BTW: creating a material outside of the shader "scope" and copying it later works, but only if you don't edit later.
-
If you assign a shader (in the material editor) to a material where both files are located in the same folder and you save this material the shader file is resetted to an empty string. The logging states that the shader failed to load because it wasn't found.
-
-
Hi Josh,
I have written my own alphatest shaders with correct transparent shadows.
When i use a material with one of these shaders, apply it to a model and place this model above a terrain it looks like this:
Now delete the terrain and recreate it and it will look correct:
Now if you leave the editor and restart it, then the bug is again visible and you need to delete/recreate the terrain again, to have correct shadows.
I have a small project prepared: just load bug.map and you should notice the bug.
-
yes, I'm still working on my .NET/Mono Wrapper for Leadwerks 3. I will have a new version ready by this weekend. Just waited for the terrain-update to be released.
- 3
-
I just get a crash, no hint about an error.
[Edit]
I just debugged it with gDebugger and got a bit more info:
Leadwerks::Camera::PostProcess - camera.cpp, line 177
Leadwerks::OpenGL2Camera::Render - opengl2camera.cpp, line 269
Leadwerks::World::Render - world.cpp, line 488
tolua_luacommands_World_Render00 - lua-gluecode.cpp, line 29559
Maybe this helps a bit more.
-
Ok. Well I thought the sample might be enough to demonstrate the behaviour, but i will try to explain it more detailed:
Expected:
All files in a project template with a extension which could be found in the .werk files section "ScanAndReplaceFiles" should be scanned and all occurances of variables like $PROJECT_TITLE, etc should be replaced in these files.
Actual Behaviour:
This only works for some predefined files (mainly the cpp project and source file). In the current version if i add a new file extension to the "ScanAndReplaceFiles" section, the content of files with the new extension is left unmodified, but the filename is still correclty scanned and replaced.
Sample "ScaneAndReplaceFiles" section:
ScanAndReplaceFiles="werk,cpp,resc"
Sample File located somewhere in the templatefolder:
Filename = "$PROJECT_TITLE.resc" Content: Title ="$PROJECT_TITLE"
After creating a project based on this template the result is something like this:
Projectname = myproject
Filename: myproject.resc Content: Title ="$PROJECT_TITLE"
I hope this explains the behaviour a bit better.
-
I have installed mine on k:/ and it has no path issues at all. Also the warnings above are a different and have nothing todo with your error .they show a problem with the compiled lib the sdk provides and can only be fixed by Josh. Your problem seems to be something else.
-
This is a Windows only problem, as far as i know. Here is a possible solution mentioned: http://cldoten.wordpress.com/2009/07/01/vs2008-fixing-the-warning-pdb-vc90-pdb-not-found/
Maybe you should reconsider the priority, because these warning indicates that debugging info is turned off and may result into some debugging bugs mentioned in the Bugtracker ( eg not able to see entity-info while debugging)
-
You don't need the callback, its optional. You can access all entities in a world after your map is loaded like this:
for(std::list<Entity*>::iterator it = world->entities.begin(); it != world->entities.end(); it++) { Entity* entity = *it; Leadwerks::System::Print(entity->GetKeyValue("name")); }
The script workaround is just for CSG objects, which are normally collapsed and optimized while the map is loaded and so they are no real entities anymore. Everything else is loaded out of the box.
-
For me it worked with static and animated entities, will check it again later, but it worked 5 minutes ago.
The callback thing was long awaited feature since LE2. You can not only make (in my opinion) cleaner code to handle special entites, but you can also integrate some kind of progress indicator. The callback itself has nearly no penaltiy on speed, as a maploader always needs to lpad an entity one by one and it doesn't hurt calling a small function providing such info.
Well, for me the callback can be extended to provide some progress info as well beside sthe loaded entity. Like number of entiy and total entity count. Mybe some kind of mapinfo class might be suitable. These infos could be sotred in the header and don't need much space.
-
Hi,
I have a couple of custom project templates based on the c++ one, but with small added files like basic config etc. Before the everything worked like a charm, but now if i want to have the project variables replaced in 3rd party files it didn't work anymore.
I have added the required extension to the ScanAndReplace section in the werk file andpreviously this worked, but now all my new created projects are useless.
I have attached a small modified c++ template which has a modified werk file ( extension 'resc' added to the scan and replace option) and a 'resc' file under the source folder.
-
maybe something simple like this: http://3drt.com/store/free-downloads/test-character-sample.html
-
Hi,
this is the usage i found out to help our glsl god "shadmar"
#include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL), buffer(NULL) {} App::~App() { delete world; delete window; } Vec3 camerarotation; #if defined (PLATFORM_WINDOWS) || defined (PLATFORM_MACOS) bool freelookmode=true; #else bool freelookmode=false; #endif bool App::Start() { //Create a window window = Window::Create("ShadmarTest"); //Create a context context = Context::Create(window); //Create a world world = World::Create(); //Create a camera camera = Camera::Create(); camera->Move(0,2,-5); //Hide the mouse cursor window->HideMouse(); std::string mapname = System::GetProperty("map","Maps/start.map"); Map::Load(mapname); //Move the mouse to the center of the screen window->SetMousePosition(context->GetWidth()/2,context->GetHeight()/2); //Create Buffer & Texture buffer = Buffer::Create(256,256,1,0,0); buffer->SetColorTexture(Texture::Create(256,256)); return true; } bool App::Loop() { //Close the window to end the program if (window->Closed()) return false; //Press escape to end freelook mode if (window->KeyHit(Key::Escape)) { if (!freelookmode) return false; freelookmode=false; window->ShowMouse(); } if (freelookmode) { //Keyboard movement float strafe = (window->KeyDown(Key:) - window->KeyDown(Key::A))*Time::GetSpeed() * 0.05; float move = (window->KeyDown(Key::W) - window->KeyDown(Key::S))*Time::GetSpeed() * 0.05; camera->Move(strafe,0,move); //Get the mouse movement float sx = context->GetWidth()/2; float sy = context->GetHeight()/2; Vec3 mouseposition = window->GetMousePosition(); float dx = mouseposition.x - sx; float dy = mouseposition.y - sy; //Adjust and set the camera rotation camerarotation.x += dy / 10.0; camerarotation.y += dx / 10.0; camera->SetRotation(camerarotation); //Move the mouse to the center of the screen window->SetMousePosition(sx,sy); } //Update world and Time Time::Update(); world->Update(); //Render to Buffer (CLS Color set to red) camera->SetClearColor(1.0f,0.0f,0.0f); buffer->Enable(); buffer->Clear(); world->Render(); buffer->Disable(); //Render to Backbuffer (normal Context) (CLS Color set to black) camera->SetClearColor(0.0f,0.0f,0.0f); Context::SetCurrent(context); world->Render(); //Draw Buffer context->DrawImage(buffer->GetColorTexture(),0,0,256,256); context->Sync(false); return true; }
I hope this will help you.
- 1
-
For me it works as well. Also the XP fact is just wrong. While indeed you can't install it on XP, you can still develop and deploy to XP.
Another hint: in the projects settings you can choose which compiler to use. So you can still use vs2010 or vs2008 compilers.
Give #include hack back in shaders.
in Suggestion Box
Posted
Just as reminder:
You can do something like this in glsl:
code with #pragma include:
and the merged code:
An idea for the auto reloading: maybe you can only scan open shader files if they use the #include statement and reload only these.