-
Posts
23,321 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Everything posted by Josh
-
1.0.3 Texture lock now implemented. Camera::SetPostEffectParameter() should be fixed when using textures as the value.
-
Yes, although if value it I would burn it onto a CD or extra USB drive. The data will be stored in the Leadwerks map file.
- 1 reply
-
- 1
-
Currently the world->renderstats structure contains this information. You must enable stats for it to be collected. The Vulkan memory allocator library probably has a command to get the total mem alloced, but I have not integrated that yet.
- 1 reply
-
- 1
-
An RGBA unorm value cannot store negative values. This compresses the values into the range 0-1. If you look in the fragment shaders, they typically convert the color back to a normal like this: normal.rgb = color.rgb * 2.0 - 1.0
-
color.r = normal.x * 0.5 + 0.5 color.g = normal.y * 0.5 + 0.5 color.b = normal.z * 0.5 + 0.5
-
Yeah, if you input an integer, it will automatically convert the bits to a float....in the 32-bit float build only. The 64-bit build will store them as doubles, since there is no issues with the precision.
-
I might have found the cause just by looking at the code: void RenderCamera::SetPostEffectObject(const int index, const int offset, shared_ptr<RenderTexture> value) { posteffectsobjects[index][offset] = value; if (value) { posteffectsparameters[index][offset] = value->core->id; } else { posteffectsparameters[index][offset] = -1; } UpdateData(); } value->core->id should be wrapped in a call to IntBitstoFloat().
-
Your first attempt above looks correct to me but I have not tested it out much...
-
Okay, so if you want to build something up from scratch, you need to break it down into pieces: You click the mouse. A sphere appears (the bullet). The bullet is positioned and rotated to match the orientation of the point on the gun where the bullet exits (the muzzle) The bullet has to be updated each frame to move forward a certain amount. When the bullet hits something it disappears.
-
There is a weapon script for guns that does this.
-
Comment out parts of your code to find out what part is causing it. If the engine memory goes up without your code doing anything, then it would indicate a leak in the engine, but that's probably not the case. It's also possible for memory usage to go up sometimes but then stabilize. This can happen when an object travels into an area of the world that does not have any octree structure initialized yet for that area or other data initialization things.
-
1.0.3 Face texture alignment buttons now work, including the "Unify faces" checkbox.
-
1.0.3 Brush face texture mapping properties now work and are saved/loaded in map files. Texture alignment buttons and texture lock do not work yet.
-
1.0.3 Brush scaling now modifies vertex coordinates instead of treating it like a model, so scaling can cause shearing on rotated brushes. Brush face and vertex tools now work in 2D viewports.
-
-
1.0.3 Scaling tool now works in 2D viewports.
-
-
-
cam->SetPostEffectParameter(effectindex, paramindex, texture) The camera used for the special pass can be set to only draw once using SetRealtime / Camera::Render.
-
Regarding the others, I think there is a mechanism in place that can accomplish this. If you create another ortho camera and call SetRealtime(false) on it, you can then call Camera::Render once to draw it it once, make it render to a texture buffer, and now you’ve got your static texture.
-
#1 is resolved, new limit is 64 floats.
-
1.0.3 First pass at showing the grid on brushes. I'll add an option to turn it off, and maybe turn down the contrast a bit. I also tried showing it on terrain and models, but it really only made sense on brushes. Terrain API is changed a bit. Call AddLayer and SetLayerWeight instead of SetMaterial. The way post-effect parameters work is changed and the limit is raised to 64 float values (four 4x4 matrices). In a shader, call ExtractPostEffectParameters(n), where n is a number from 0 to 3. This will return a 4x4 matrix storing 16 float values. All values will be 0.0 until they are set programmatically. The PostEffectParameterN variables are still in the shaders, but won't work anymore. So if you wanted to get the first to values it would be like this: mat4 params = ExtractPostEffectParameters(0); float val0 = params[0][0]; int val1 = floatBitsToInt(params[0][1]);
-
-
Does the increased memory get released when you resume the time?