chore: checkpoint web Blender migration source, tools and docs
Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer, web workflow engine and protocol, tooling, docs and task records. Large generated evidence, user-testing archives, build snapshots and imported test assets remain untracked. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -29,12 +29,23 @@ uint gpu_index_load(uint element_index)
|
||||
return element_index;
|
||||
}
|
||||
|
||||
#ifdef GPU_WEBGL
|
||||
uint raw_index = gpu_webgl_load_gpu_index_buf(gpu_index_16bit ? element_index >> 1u :
|
||||
element_index);
|
||||
#else
|
||||
uint raw_index = gpu_index_buf[gpu_index_16bit ? element_index >> 1u : element_index];
|
||||
#endif
|
||||
|
||||
if (gpu_index_16bit) {
|
||||
raw_index = ((element_index & 1u) == 0u) ? (raw_index & 0xFFFFu) : (raw_index >> 16u);
|
||||
}
|
||||
|
||||
#ifdef GPU_WEBGL
|
||||
/* Preserve fixed restart before adding the compressed buffer's base index. */
|
||||
if (raw_index == (gpu_index_16bit ? 0xFFFFu : 0xFFFFFFFFu)) {
|
||||
return 0xFFFFFFFFu;
|
||||
}
|
||||
#endif
|
||||
return raw_index + uint(gpu_index_base_index);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,14 +69,14 @@ uint rgb9e5_encode(float3 color)
|
||||
{
|
||||
rgb9e5_t result = rgb9e5_from_float3(color);
|
||||
result.exp_shared <<= RGB9E5_MANTISSA_BITS * 3;
|
||||
result.mantissa <<= RGB9E5_MANTISSA_BITS * uint3(0, 1, 2);
|
||||
result.mantissa <<= uint(RGB9E5_MANTISSA_BITS) * uint3(0, 1, 2);
|
||||
return result.mantissa.r | result.mantissa.g | result.mantissa.b | result.exp_shared;
|
||||
}
|
||||
|
||||
float3 rgb9e5_decode(uint data)
|
||||
{
|
||||
int exp_shared = int(data >> (RGB9E5_MANTISSA_BITS * 3));
|
||||
uint3 mantissa = (uint3(data) >> (RGB9E5_MANTISSA_BITS * uint3(0, 1, 2))) &
|
||||
uint3 mantissa = (uint3(data) >> (uint(RGB9E5_MANTISSA_BITS) * uint3(0, 1, 2))) &
|
||||
uint(MAX_RGB9E5_MANTISSA);
|
||||
return float3(mantissa) * rgb9e5_exponent_factor(exp_shared);
|
||||
}
|
||||
|
||||
@@ -6,15 +6,20 @@
|
||||
|
||||
#include "gpu_shader_compat.hh"
|
||||
|
||||
#ifdef GPU_WEBGL
|
||||
/* WebGL stores the single-mip tile map layers as rows. Integer fetches are unchanged. */
|
||||
bool tiled_image_lookup(float3 &co, sampler2DArray ima, sampler2D map)
|
||||
#else
|
||||
bool tiled_image_lookup(float3 &co, sampler2DArray ima, sampler1DArray map)
|
||||
#endif
|
||||
{
|
||||
float2 tile_pos = floor(co.xy);
|
||||
|
||||
if (tile_pos.x < 0 || tile_pos.y < 0 || tile_pos.x >= 10) {
|
||||
if (tile_pos.x < 0.0f || tile_pos.y < 0.0f || tile_pos.x >= 10.0f) {
|
||||
return false;
|
||||
}
|
||||
float tile = 10 * tile_pos.y + tile_pos.x;
|
||||
if (tile >= textureSize(map, 0).x) {
|
||||
float tile = 10.0f * tile_pos.y + tile_pos.x;
|
||||
if (tile >= float(textureSize(map, 0).x)) {
|
||||
return false;
|
||||
}
|
||||
/* Fetch tile information. */
|
||||
|
||||
Reference in New Issue
Block a user