AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

RGB to Float3

Ein Thema von EWeiss · begonnen am 3. Jun 2013 · letzter Beitrag vom 3. Jun 2013
 
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
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:13 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz