diff options
| author | jfons <joan.fonssanchez@gmail.com> | 2021-04-25 23:36:39 +0200 |
|---|---|---|
| committer | jfons <joan.fonssanchez@gmail.com> | 2021-05-03 18:10:34 +0200 |
| commit | 6995b0429c5b42d41cc4d1851ea1f2272f121a26 (patch) | |
| tree | 4356830f39c5efbc959b5d8dcdff472a5e96fa75 /servers/rendering_server.cpp | |
| parent | eb57dcdb909dd45eaff6e25858a1907e13df4f59 (diff) | |
| download | redot-engine-6995b0429c5b42d41cc4d1851ea1f2272f121a26.tar.gz | |
Assorted fixes to UV unwrapping and GPU lightmapper
Various fixes to UV2 unwrapping and the GPU lightmapper. Listed here for
context in case of git blame/bisect:
* Fix UV2 unwrapping on import, also cleaned up the unwrap cache code.
* Fix saving of RGBA images in EXR format.
* Fixes to the GPU lightmapper:
- Added padding between atlas elements, avoids bleeding.
- Remove old SDF generation code.
- Fix baked attenuation for Omni/Spot lights.
- Fix baking of material properties onto UV2 (wireframe was
wrongly used before).
- Disable statically baked lights for objects that have a
lightmap texture to avoid applying the same light twice.
- Fix lightmap pairing in RendererSceneCull.
- Fix UV2 array generated from `RenderingServer::mesh_surface_get_arrays()`.
- Port autoexposure fix for OIDN from 3.x.
- Save debug textures as EXR when using floating point format.
Diffstat (limited to 'servers/rendering_server.cpp')
| -rw-r--r-- | servers/rendering_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 3605dec1be..a9154603ee 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -472,8 +472,8 @@ Error RenderingServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint const Vector2 *src = array.ptr(); for (int i = 0; i < p_vertex_array_len; i++) { - uint16_t uv[2] = { Math::make_half_float(src[i].x), Math::make_half_float(src[i].y) }; - memcpy(&aw[p_offsets[ai] + i * p_attrib_stride], uv, 2 * 2); + float uv[2] = { src[i].x, src[i].y }; + memcpy(&aw[p_offsets[ai] + i * p_attrib_stride], uv, 2 * 4); } } break; case RS::ARRAY_CUSTOM0: |
