<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bitmap Output Amount, Offset, RGB Level and Premultiplied Alpha in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/bitmap-output-amount-offset-rgb-level-and-premultiplied-alpha/m-p/6808914#M13402</link>
    <description>&lt;P&gt;Is the output of your shader just darker/brighter than the Max material? Then you'll probably need to do &lt;A href="http://help.autodesk.com/view/3DSMAX/2017/ENU/?guid=__files_GUID_55EACC61_25FE_499B_8D33_38B306AB4B29_htm" target="_self"&gt;gamma correction&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;float gamma = 2.2;
Bitmap.rgb = pow(Bitmap.rgb, vec3(1.0/gamma));&lt;/PRE&gt;</description>
    <pubDate>Mon, 16 Jan 2017 19:53:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-01-16T19:53:45Z</dc:date>
    <item>
      <title>Bitmap Output Amount, Offset, RGB Level and Premultiplied Alpha</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/bitmap-output-amount-offset-rgb-level-and-premultiplied-alpha/m-p/6807888#M13401</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am tearing my hairs out trying to figure out how the Bitmap Operators work. I want to create them in a hlsl shader and try to figure out how it works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I have got for Output, Offset and rgb Level:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Bitmap.rgb *= rgbLevel; &lt;BR /&gt;Bitmap.rgb = clamp(Bitmap.rgb + offset * Bitmap.a, 0, 1);&lt;BR /&gt;Bitmap.rgba = Bitmap.rgba * outputAmount;&lt;/PRE&gt;&lt;P&gt;The Output amount seams not to be correct, the Color is different from the Max material.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Does anybody know where I can find the resources how 3dsmax treats the Bitmap internally?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you much&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2017 13:32:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/bitmap-output-amount-offset-rgb-level-and-premultiplied-alpha/m-p/6807888#M13401</guid>
      <dc:creator>robert3dsmax</dc:creator>
      <dc:date>2017-01-16T13:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Bitmap Output Amount, Offset, RGB Level and Premultiplied Alpha</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/bitmap-output-amount-offset-rgb-level-and-premultiplied-alpha/m-p/6808914#M13402</link>
      <description>&lt;P&gt;Is the output of your shader just darker/brighter than the Max material? Then you'll probably need to do &lt;A href="http://help.autodesk.com/view/3DSMAX/2017/ENU/?guid=__files_GUID_55EACC61_25FE_499B_8D33_38B306AB4B29_htm" target="_self"&gt;gamma correction&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;float gamma = 2.2;
Bitmap.rgb = pow(Bitmap.rgb, vec3(1.0/gamma));&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jan 2017 19:53:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/bitmap-output-amount-offset-rgb-level-and-premultiplied-alpha/m-p/6808914#M13402</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-16T19:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Bitmap Output Amount, Offset, RGB Level and Premultiplied Alpha</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/bitmap-output-amount-offset-rgb-level-and-premultiplied-alpha/m-p/7865555#M13403</link>
      <description>&lt;P&gt;Thank you for your answer and my very late reply. I fixed it that time (I hope), the order is important as well:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//rgbLevel:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bitmap.rgb =&amp;nbsp; bitmap.rgb * rgbLevel;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//offset:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bitmap.rgb = bitmap.rgb + offset * bitmap.a;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//outputAmount:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bitmap.rgba = bitmap.rgba * outputAmount;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//inbetween clamp:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bitmap.rgba = clamp(bitmap.rgba, 0.0, 1.0);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//invert&lt;/FONT&gt;&lt;BR /&gt;bitmap.rgb = 1.0 - bitmap.rgb;&lt;BR /&gt;&lt;FONT color="#339966"&gt;//clamp&lt;/FONT&gt;&lt;BR /&gt;bitmap.rgba = clamp(bitmap.rgba, 0, 1);&lt;BR /&gt;&lt;FONT color="#339966"&gt;//alpha from rgb Amount&lt;/FONT&gt;&lt;BR /&gt;bitmap.a = (bitmap.r + bitmap.g + bitmap.b) / 3.0;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 16:41:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/bitmap-output-amount-offset-rgb-level-and-premultiplied-alpha/m-p/7865555#M13403</guid>
      <dc:creator>robert3dsmax</dc:creator>
      <dc:date>2018-03-19T16:41:42Z</dc:date>
    </item>
  </channel>
</rss>

