AGB  ·  Datenschutz  ·  Impressum  







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

OpenGL: Verdunkeln

Ein Thema von Destroyer446 · begonnen am 7. Jul 2012 · letzter Beitrag vom 7. Jul 2012
 
Namenloser

Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
 
FreePascal / Lazarus
 
#6

AW: OpenGL: Verdunkeln

  Alt 7. Jul 2012, 18:15
Das Problem dabei ist, wenn ich z.B. habe:
glColor3f(0, 240, 233);

und dann als dunkle variante mache:
glColor3f(0, 213, 206);

funzt das nich weil er nicht von 255 ausgeht sondern von 213 wenn 213 das höchste ist.
Das heißt er rechnet nur Prozentual - und das möchte ich vermeiden.
Die Parameter von glColor3f gehen von 0.0 bis 1.0, nicht von 0 bis 255.

Zitat von OpenGl-Spezifikation:
Current color values are stored in floating-point format, with unspecified mantissa and exponent sizes. Unsigned integer color components, when specified, are linearly mapped to floating-point values such that the largest representable value maps to 1.0 (full intensity), and 0 maps to 0.0 (zero intensity). Signed integer color components, when specified, are linearly mapped to floating-point values such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0 . [...]

Floating-point values are mapped directly.
Das was in fett geschrieben ist, passiert bei dir.
  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 01:26 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