Jump to content

Josh

Staff
  • Posts

    23,321
  • Joined

  • Last visited

Everything posted by Josh

  1. 1.0.3 Texture lock now implemented. Camera::SetPostEffectParameter() should be fixed when using textures as the value.
  2. Josh

    Hmaps

    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.
  3. 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.
  4. 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
  5. color.r = normal.x * 0.5 + 0.5 color.g = normal.y * 0.5 + 0.5 color.b = normal.z * 0.5 + 0.5
  6. 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.
  7. 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().
  8. Your first attempt above looks correct to me but I have not tested it out much...
  9. 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.
  10. There is a weapon script for guns that does this.
  11. 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.
  12. 1.0.3 Face texture alignment buttons now work, including the "Unify faces" checkbox.
  13. 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.
  14. 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.
  15. Josh

    Grid Everywhere

    No, it gets activated based on camera settings. It's turned off by default.
  16. 1.0.3 Scaling tool now works in 2D viewports.
  17. Josh

    Sideways Terrain

    You can cut holes. In the future I want to implement terrain brushes like Valve uses, which would support caves and such. Basically you construct a rough shape from box brushes, and then each face gets subdivided and can be sculpted like a terrain.
  18. Josh

    Grid Everywhere

    It's build into the PBR shader now.
  19. cam->SetPostEffectParameter(effectindex, paramindex, texture) The camera used for the special pass can be set to only draw once using SetRealtime / Camera::Render.
  20. 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.
  21. #1 is resolved, new limit is 64 floats.
  22. 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]);
  23. Josh

    Grid Everywhere

    This is an idea from the innovative but perhaps flawed map editor "Trenchbroom". The world grid is displayed across all surfaces for easier alignment. This is a shader effect.
  24. Does the increased memory get released when you resume the time?
×
×
  • Create New...