-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ConvertType #23635
Update ConvertType #23635
Conversation
Actually, here can be reused function Also I suggest adding to the ConvertType some cache - so e.g. if |
@sunag What is your opinion about something like |
Sounds good! Can you do this update without change |
This is the part that I called arguments' flatting. I changed the core code to remove valueComponents - I can revert it back. |
Done. |
I've fixed the error, but for some reason the models now appear to be white instead of black... |
@LeviPesin Seems that See const a = sub( mul( pow( value.rgb, vec3( 0.41666 ) ), 1.055 ), vec3( 0.055 ) );
const b = mul( rgb, 12.92 );
const factor = vec3( lessThanEqual( rgb, vec3( 0.0031308 ) ) );
const rgbResult = mix( a, b, factor );
return join( rgbResult.r, rgbResult.g, rgbResult.b, value.a ); nodeVar4 = pow( DiffuseColor.xyz, vec3<f32>( 0.0, 0.0, 0.0 ) );
nodeVar5 = ( nodeVar4 * vec3<f32>( 1.055 ) );
nodeVar6 = ( nodeVar5 - vec3<f32>( 0.0, 0.0, 0.0 ) );
nodeVar7 = ( DiffuseColor.xyz * vec3<f32>( 12.92 ) );
nodeVar8 = mix( nodeVar6, nodeVar7, vec3<f32>( 0.0, 0.0, 0.0 ) );
Output = vec4<f32>( nodeVar8.x, nodeVar8.y, nodeVar8.z, DiffuseColor.w ); |
Fixed. |
Is it better now? Also, maybe it would be better to remove Also, the cache should be added to the |
@LeviPesin I think we can keep as is for now... |
Thanks! 👍 |
* Flat params * Remove valueComponents * Lint * Lint * Reuse functions from InputNode.js * Fix * Fix * Add cache * Move ArrayMap and flatArray * Revert valueComponents' removal * Fix ArrayMap * Fix * Fix * Fix * Add size cap to ArrayMap * Fix * Rework ConvertType * Fix * Another fix * Fix uints in NodeBuilder * Change ArrayMap cache to just Map * optional params * fix color type * fix uniform * recovering bad fix conflict * static cacheMap * cleanup * Two cache maps * Cleanup * Fix * Add constants' cache to ShaderNodeObject * Fix * Simplify cache * Fix * Fix typo * fix negate cache * cleanup Co-authored-by: sunag <[email protected]>
Related issue: #23601 (comment)
Description
RemovevalueComponents
.Add arguments' flatting.RemovevalueClass
.