1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-06 14:23:34 +00:00
Commit graph

1347 commits

Author SHA1 Message Date
bjorn e371359193 Compute shader glsl prefix; 2018-08-11 00:08:33 -07:00
bjorn 98e518683a Add computeshaders to lovr.graphics.getSupported; 2018-08-11 00:08:33 -07:00
bjorn 3b51056870 lovr.graphics.compute; 2018-08-11 00:08:33 -07:00
bjorn 2cb6de47f2 Compute shader creation; 2018-08-11 00:08:33 -07:00
bjorn b1079f5ce8 Separate initialization for graphics/compute shaders; 2018-08-11 00:08:33 -07:00
bjorn bf3ed3ed1f Texture improvements;
Textures no longer keep references to their TextureData.
lovrTextureAllocate can now be used to allocate texture storage,
and isn't weirdly coupled to lovrTextureReplacePixels.
Better error messages for textures.
2018-08-09 16:12:57 -07:00
Bjorn Swenson 06379f33ee
Merge pull request #49 from bjornbytes/shader-block
ShaderBlock
2018-08-07 15:17:06 -07:00
bjorn ae70728ae1 Ok is this a driver bug or what; 2018-08-07 13:26:28 -07:00
bjorn 78d9cc0031 Actually set shader uniforms; 2018-08-06 13:44:46 -07:00
bjorn 8f529d3a37 Fix potential infinite loop in error handler; 2018-08-06 13:26:17 -07:00
bjorn 175de8924f Ensure uniform count is always positive; 2018-08-06 13:25:04 -07:00
bjorn bdf130800e ShaderBlock:getShaderCode; 2018-08-06 11:46:42 -07:00
bjorn f95685ba80 ShaderBlock:send(blob); 2018-08-06 10:42:23 -07:00
bjorn 86380e7694 ShaderBlock:getOffset; 2018-08-06 10:42:19 -07:00
bjorn e3e17bc84c ShaderBlock:isWritable; 2018-08-06 10:41:57 -07:00
bjorn 70b27bd846 Use new table shorthand for newShaderBlock formats;
Also luax_checkuniformtype and error message improvements.
2018-08-06 10:34:12 -07:00
bjorn 08b113f755 opps; 2018-08-06 09:12:59 -07:00
bjorn 22b674b737 emscripten guards; 2018-08-06 08:51:06 -07:00
bjorn 5cefe023d1 Fix issue where binding msaa canvas could fail; 2018-08-04 18:46:04 -07:00
bjorn a713a3d14f Use 4 for default msaa instead of max;
Turns out msaa of 32 is really really slow
2018-08-04 18:44:36 -07:00
bjorn c770ec6226 Fix undefined variable; 2018-08-03 19:21:15 -07:00
bjorn b33e0e33c5 Improve error messages slightly; 2018-08-03 13:19:28 -07:00
bjorn 66c1f373d3 Fix (i)vec3 std140; 2018-08-03 12:36:25 -07:00
bjorn 75159a7823 Error if you try to create an SSBO but it's not supported; 2018-08-03 12:30:01 -07:00
bjorn 96a1d96798 Shader refcounts its blocks; 2018-08-03 12:28:25 -07:00
bjorn 1d4992a1ff Enforce limits on UBO/SSBO count in Shaders; 2018-08-03 12:24:41 -07:00
bjorn 5e9ef9a757 rm writable from UniformBlock; 2018-08-03 12:22:28 -07:00
bjorn 1b7261de5c lovr.graphics.getSupported; 2018-08-03 11:46:21 -07:00
bjorn f6f322fc7f Treat UBOs and SSBOs more similarly to reduce duplication; 2018-08-03 11:34:11 -07:00
bjorn 76fb1681fa Storage buffer variable introspection; 2018-08-03 11:19:40 -07:00
bjorn da3356bb2f Shader introspection for storage blocks; 2018-08-02 17:18:03 -07:00
bjorn 7d9b728669 Remove 32 uniform limit; 2018-08-02 16:13:27 -07:00
bjorn 085ee71d86 ARB_compute_shader; ARB_program_interface_query; ARB_shader_storage_buffer_object; 2018-08-02 15:34:58 -07:00
bjorn 1946f860f8 More storage block stuff; 2018-08-02 05:04:40 -07:00
bjorn b8faff6986 Add writable and usage flags to ShaderBlock; 2018-08-02 05:04:40 -07:00
bjorn ee213c8b5a Yeah yeah whatever std140; 2018-08-02 05:04:40 -07:00
bjorn d1923ce711 Put back apple instancing fix; 2018-08-02 05:04:40 -07:00
bjorn 73b50c22cd Fix some typos; 2018-08-02 05:04:40 -07:00
bjorn 5e8f4bb69c Shader:setBlock validation; 2018-08-02 05:04:40 -07:00
bjorn 7e3f256ba2 Spacing; 2018-08-02 05:04:40 -07:00
bjorn ce19599fec Improve uniform error messages; 2018-08-02 05:04:40 -07:00
bjorn 4589ce66d0 luax_checkuniform supports samplers; 2018-08-02 05:04:40 -07:00
bjorn 2b093b5828 ShaderBlock:send; Helper function for reading uniforms; 2018-08-02 05:04:40 -07:00
bjorn 18ee139341 rm shaderblock header; 2018-08-02 05:04:40 -07:00
bjorn a4052430a4 Shader:getBlock; Shader:setBlock; 2018-08-02 05:04:40 -07:00
bjorn 854431c9ea Rebase; 2018-08-02 05:04:40 -07:00
bjorn a372abb810 Reorganize uniform/block data structures; 2018-08-02 05:04:40 -07:00
bjorn e8afcb9b71 Shaders introspect their blocks; 2018-08-02 05:03:28 -07:00
bjorn 85ff844d24 lovrShaderBlockCreate; 2018-08-02 05:03:28 -07:00
bjorn 823886f03f Start newShaderBlock; 2018-08-02 05:03:28 -07:00
bjorn 23bfc4b5aa Fix bug with texture atlas expansion; 2018-08-02 03:41:21 -07:00
bjorn d0381cbf9d Don't forget to retain the blob; 2018-08-02 03:41:21 -07:00
bjorn 8405bff070 Use stb_truetype instead of FreeType; 2018-08-02 03:41:21 -07:00
bjorn 0b70285e30 Fix WebGL memcpys; 2018-08-02 03:40:47 -07:00
bjorn b6afc59b33 rm gpu.h 2018-08-02 03:31:45 -07:00
bjorn 76023b4b6c Fix Shader uniform leak; 2018-08-02 03:27:16 -07:00
bjorn abd1c75140 Properly release glyph TextureData; 2018-08-02 03:27:16 -07:00
bjorn ae4f0e1e6c Fix potential ModelData leaks; 2018-08-02 03:27:16 -07:00
bjorn 61e545c7e6 Fix Texture:encode leak; 2018-08-02 03:27:16 -07:00
bjorn e5fd9c7412 Fix SoundData leaks; 2018-08-02 03:27:16 -07:00
bjorn 2acc4761b7 Fixes for WebGL; rm sharpness from texture filter; 2018-08-02 01:31:23 -07:00
bjorn d7bb4321d0 Add parentheses around braced initializer lists; 2018-08-01 21:06:16 -07:00
bjorn 87ff99108d Update boot.lua; 2018-07-28 18:41:51 -07:00
bjorn 785913fd45 Add conf.headset.msaa config;
For separate window/headset msaa settings.  Currently only applies
to OpenVR since the other drivers render directly to the window.
2018-07-28 18:12:57 -07:00
bjorn 3c2d644d9f Fake headset doesn't stomp on existing glfw callbacks; 2018-07-27 19:53:40 -07:00
bjorn 9e494cae46 Make custom events work; 2018-07-26 19:38:01 -07:00
bjorn 156c0cde5d Condense event code a bit; 2018-07-26 19:38:01 -07:00
bjorn 693766cf3b Hmm, byte vertex attributes can have more than 1 component; 2018-07-25 00:01:22 -07:00
bjorn d79afb44d2 Make gl_ViewportIndex work in fragment shaders; 2018-07-25 00:01:22 -07:00
bjorn 0b922a9703 rm Variant type name tracking; 2018-07-24 21:21:37 -07:00
bjorn d6daa885c8 Simplify luax_checktype and inheritance; 2018-07-24 21:15:07 -07:00
bjorn 83ddb82162 Simplify Lua object management; 2018-07-24 20:13:54 -07:00
bjorn bc2d638b00 Refs know their type; 2018-07-24 19:14:29 -07:00
bjorn 307d002954 Fix some strictness issues from windows; 2018-07-22 21:02:02 -07:00
bjorn eb45b6f04f Add the ability to set Texture LOD bias; 2018-07-22 20:37:27 -07:00
bjorn 66ca77abd1 Texture:replacePixels supports mipmap; 2018-07-22 20:37:27 -07:00
bjorn 2dc79a48a8 Use single pass stereo rendering when supported; 2018-07-21 05:30:13 -07:00
bjorn 7d5f2ba75a Add ARB_viewport_array; 2018-07-21 05:29:43 -07:00
bjorn 86c64e73c1 Add GL_NV_stereo_view_rendering; Add GL_NV_viewport_array2; 2018-07-21 03:03:52 -07:00
bjorn bdde8ac4b9 rm OVR_multiview extension; 2018-07-20 18:12:51 -07:00
bjorn 98e0522c4f Add more texture formats; 2018-07-20 17:45:25 -07:00
bjorn 5f06ca44c9 Improve error messages for bad vertex formats; 2018-07-20 15:53:53 -07:00
bjorn 686f621928 That error message was such a liar; 2018-07-20 15:51:58 -07:00
bjorn c46cff496e Fix minor issue with texture flag defaults; 2018-07-19 19:30:37 -07:00
bjorn 11a3937a5d Improved mipmap support;
- Texture dimensions functions take an optional mipmap level.
- Add Texture:getMipmapCount.
- Fix issue where textures always allocated mipmap storage.
2018-07-19 19:28:27 -07:00
bjorn 52f679e865 Remove shader length limit; 2018-07-19 02:03:46 -07:00
bjorn c6a97a9a23 Fix issue where nogame's conf was ignored; 2018-07-19 01:08:50 -07:00
bjorn c9c722959f Remove uniform.index; 2018-07-18 21:38:38 -07:00
bjorn b60a3c2f3b Reduce max uniform/attribute name length; 2018-07-18 21:34:34 -07:00
bjorn c19d69cfdd Fix dll/so loading; Respect hyphens; 2018-07-18 17:09:47 -07:00
bjorn d4c28f5770 Texture:replacePixels accepts x/y offset; 2018-07-18 01:36:29 -07:00
bjorn 8cc795aa9d Material:getTransform; Material:setTransform; 2018-07-18 01:17:16 -07:00
bjorn 5641afee13 Remove isDefault flag from Material; 2018-07-18 00:34:21 -07:00
bjorn 39532dc67a oops; 2018-07-18 00:33:56 -07:00
bjorn 317fa98bdd Fix sphere; 2018-07-17 19:20:40 -07:00
bjorn cfd96b2dee Fix Canvas stuff; 2018-07-17 19:20:33 -07:00
bjorn c065bda3f0 Some optimization/profiling of state changes; 2018-07-17 18:49:42 -07:00
bjorn 05b0ea203f WebVR update; 2018-07-17 17:21:15 -07:00
bjorn 132442cb01 Fix something that got messed up in Model; 2018-07-17 17:21:15 -07:00
bjorn b3be4a0b93 rm opengl.h; 2018-07-17 17:21:15 -07:00