Jump to content
  • entries
    9
  • comments
    52
  • views
    25,566

About this blog

Shader experiments in Leadwerks

Entries in this blog

PBR Lighting in Leadwerks

Physically-based Rendering (PBR), often also called Physically-based Shading (PBS), has taken the world of game engines and content creation tools by storm over the last couple of years. And for good reason: Art assets can be produced in a much more predictable and consistent way, since its properties directly relate to (measurable) real-world data, like the diffuse color of a material or the luminous flux (in lumen) of a light source. Even better, those assets also behave predictably and cosist

Rastar

Rastar

Pass the tessellation, please! (Part 2)

Yeah, I know, the suspense was too much... :-) Who am I to torture you any longer? Here is the eagerly awaited next step in the tessellation pipeline - the evaluation shader.   After having defined the tessellation factors in the control shader, a fixed (non-programmable) tessellation stage takes over and creates all those little vertices and triangles for you. The result is then passed into the evaluation stage as patches whose size was defined in the control shader by the   layout (vert

Rastar

Rastar

Pass the tessellation, please! (Part 1)

After some crunch time at work and a bit of vacation it's about time to continue with my "me too" attempts at using tessellation. Before proceeding with my terrain implementation I'd first like to give a bit of information about the new tessellation functionality in OpenGL. Again, the usual disclaimer: I'm just learning that stuff as well, so this will be basic explanations.   Introduction Together with the subsequent geometry shader, tessellation is one of the stages where vertices can be cr

Rastar

Rastar

Teaser from Tron land

At this point just a little WIP note to make sure Josh doesn't take over the blog space...   I am still tuning the tessellation procedure. Temporarily (?) I have switched from my beatifully crafted concentric mesh rings to a uniform grid structure - it is more difficult to get a smooth LOD transition for those rings than for a uniform mesh, and I have enough problems with that already. So, I'll first try to get things right with the simpler mesh structure and then see if things work as well w

Rastar

Rastar

Up! (Part 2)

After torturing you with a walk-through of my terrain vertex shader I will do the same harm again, this time using the fragment shader... Without further ado, here we go:   #version 400 //Uniforms uniform sampler2D texture0;//diffuse map uniform sampler2D texture1;//normal map   After the obligatory version information, this time two texture uniforms are declared, the (already used) diffuse map and an additional normal map.   //Inputs in vec2 ex_texcoords0; in vec4 ex_color; in ma

Rastar

Rastar

Up! (Part 1)

I feel a bit like I'm spamming the community blog... but of course that won't stop me from doing it again! With the basic mesh generated it's now time for diving into shader programming. I will displace the vertices in the vertical using a heightmap, and then apply a global color and normal map to make the terrain look more... terrainy. I'll explain the shader line by line. All of this will actually be very basic (so, shadmar and klepto: Move along, nothing to see here... whew, we're amongst ou

Rastar

Rastar

Patchwork

As described in my last post, I'd like to create a homegrown system for rendering large terrains. The basic idea is to use a set of planar mesh patches that are displaced in the vertical using a heightmap in the shaders, and using OpenGL 4's tessellation features to create a more detailed and optimally structured mesh during run-time. Also mentioned before was the fact that this might be a bit of trial and error, so bear with me, and if you see me running in the wrong direction - please let me k

Rastar

Rastar

Large-scale terrain algorithms

Leadwerks has a very nice terrain system that allows terrains of up to 4096x4096 units (in version 3.1, 3.0 goes up to 1024x1024) that performs very well and has a pretty unique texturing method. For most game applications, this is more than enough - filling such an area with objects and interesting gameplay is already quite a challenge. But some game ideas still require larger terrains. In my case, I am pondering something similar to a racing game, taking place in real-world areas, where a sing

Rastar

Rastar

A walk in the woods

After cluttering the regular Leadwerks forums with irregular posts and screenshots about terrains, tessellation and the like, I thought it might be better to collect those in a blog where I can happily mumble to myself without distracting anyone...   So what's this about? Well, from day one of my (not so long ago) foray into game development I have been interested in creating large outdoor scenes. Now, most game engines don't support the required features for that out of the box, and I guess f

Rastar

Rastar

×
×
  • Create New...