lovr icon indicating copy to clipboard operation
lovr copied to clipboard

lovr.graphics.plane subdivisions

Open bjornbytes opened this issue 5 years ago • 6 comments

Add a subdivisions argument to plane:

lovr.graphics.plane(style, transform, u, v, w, h, subdivisions)

For heightmaps

bjornbytes avatar Oct 29 '20 22:10 bjornbytes

Defaults to zero

bjornbytes avatar Oct 29 '20 22:10 bjornbytes

Use it for a spiffy heightmap example

bjornbytes avatar Oct 29 '20 22:10 bjornbytes

Maybe a ShaderFlag to help write vertex shaders that displace vertices based on textures.

bjornbytes avatar Oct 29 '20 22:10 bjornbytes

having separate subdivisions for x and y would be useful for things like screen space techniques (by default they can just be the same value). note the (undesired) wide polygons in the wireframe: image

shakesoda avatar Oct 30 '20 05:10 shakesoda

:+1: wonder if it should be a table or 2 numbers

bjornbytes avatar Oct 30 '20 06:10 bjornbytes

This is implemented on dev branch (takes x and y subdivisions, works with both line and fill modes).

bjornbytes avatar Aug 04 '22 21:08 bjornbytes