Thema: RGB to Float3

Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#7

AW: RGB to Float3

  Alt 3. Jun 2013, 06:18
Irgendwie will der kram wieder nicht.
Double sollte eigentlich einen wert 0.111111 liefern können

fr := StrToInt(tmpStr[1]) / 255;

fr := 0;

Scheint so das ich heute was an der Klatsche habe

List.Add('Raw umber' + ',' + '146, 102, 68');
sollte dem wert
float3(1.30, 1.02, 0.68) entsprechen da komme ich aber mit Extended(Double) nicht dran.

Mit meinem Rechner
146/255 := 0.5725490196

Komme nicht auf den wert 1.30

EDIT:
Hmmm
Denke das geht nicht so einfach

Code:
float4 SepiaPass( float4 colorInput, float2 tex )
{
   float4 sepia = colorInput;
   // Calculating amounts of input, grey and sepia colors to blend and combine
   float grey = dot(sepia.rgb, float4(0.3, 0.59, 0.11, 0));
   sepia.rgb = float4(sepia.rgb * ColorTone , 1);
   float4 grey2 = grey * (GreyPower);
   float4 color2 = colorInput / (GreyPower + 1);
   float4 blend2 = grey2 + color2;
   sepia.rgb = lerp(blend2, sepia.rgb, SepiaPower);
   // returning the final color
   return sepia;
}
Da spielen andere Faktoren noch eine rolle.
Hardcoden ist schlecht möchte ich eigentlich nicht so gerne.


gruss

Geändert von EWeiss ( 3. Jun 2013 um 06:31 Uhr)
  Mit Zitat antworten Zitat