patriciogonzalezvivo / comfyui_glslnodes

GLSL node for ComfyUI
GNU General Public License v3.0
183 stars 14 forks source link

16/32-bit glslViewer output? #16

Open ncl-mars opened 6 days ago

ncl-mars commented 6 days ago

Hello,

Is it possible to output 16-bit or 32-bit color depth images from the glslViewer node? I'am trying to achieve this but I cannot get it to work.

So far I've tried the "SaveEXR" node from "ComfyUI-HQ-Image-Save" (https://github.com/spacepxl/ComfyUI-HQ-Image-Save) and the "Video Combine" (with video/16b-png to output the viewer but it doesn't work.

Thanks, Best Regards, Nicolas

ncl-mars commented 5 days ago

Is this avoidable ?

// https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/CGIncludes/UnityCG.cginc // Encoding/decoding [0..1) floats into 8 bit/channel RGBA. Note that 1.0 will not be encoded properly.

vec4 EncodeFloatRGBA( float v ){ vec4 kEncodeMul = vec4(1.0, 255.0, 65025.0, 16581375.0); float kEncodeBit = 1.0/255.0; vec4 enc = kEncodeMul v; enc = fract (enc); enc -= enc.yzww kEncodeBit; return enc; }

Thanks, Nicolas