Skip to content

White = 1 evauates to color red #486

@CousinRicky

Description

@CousinRicky

Summary

The expression color White=1 evaluates to color <1,0,0,1,1>.

POV-Ray Version

  • Incarnation: POV-Ray for Unix
  • Affected build version: 3.8.0-beta.2 (self-compiled)
  • Known working build version: 3.7.0.10 (self-compiled)

Runtime Environment

  • Operating system: openSUSE 15.6 (GNU/Linux)
  • Hardware architecture: x86-64
  • CPU model: Intel core i7

Scene

Details

#version max (3.5, min (3.8, version));

global_settings { assumed_gamma 1 }

#include "colors.inc"

#debug concat ("<", vstr (5, White, ", ", 0, 4), ">\n")
#debug concat ("<", vstr (5, (White = 1), ", ", 0, 4), ">\n")
#declare Test = color White = 1;
#debug concat ("<", vstr (5, Test, ", ", 0, 4), ">\n")

box
{ -6, 6 hollow
  pigment { rgb 1 }
}
camera
{ location <0, 0, -5>
  angle 60
}
light_source
{ <0, 0, 5> 
  color White = 1
}

Expected Behavior

Component-wise evaluation of White=1 should yield <1,1,1,0,0>

Expected output should be a white image with text output:

<1.0000, 1.0000, 1.0000, 0.0000, 0.0000>
<1.0000, 1.0000, 1.0000, 0.0000, 0.0000>
<1.0000, 1.0000, 1.0000, 0.0000, 0.0000>

This is the behavior of POV-Ray versions 3.7.0.10 and earlier.

Actual Behavior

The image was red, and 'White=1` evaluated to <1,0,0,1,1>.

Output

<1.0000, 1.0000, 1.0000, 0.0000, 0.0000>
<1.0000, 0.0000, 0.0000, 1.0000, 1.0000>
<1.0000, 0.0000, 0.0000, 1.0000, 1.0000>

Additional context

The issue was first noted by kurtz le pirate in newsgroup thread povray.general: Strange syntax

Kurtz probably uses a different platform than mine, probably a Macintosh. (Please correct me if I’m wrong.)

Metadata

Metadata

Assignees

Labels

bug?reported as bug; triage pending

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions