---
title: "PxrCookieLightFilter"
canonical: "https://rmanwiki-26.pixar.com/space/REN26/19661755/PxrCookieLightFilter"
format: markdown
---
PxrCookieLightFilter projects a painted texture in front of the light.

This light filter is a more extensive version of [PxrGoboLightFilter](https://renderman.atlassian.net/wiki/spaces/REN26/pages/19661757)

  


---

  


### Parameters

**Cookie Mode**

Specify the cookie mode:

**Physical (0)**: The cookie behaves like a stained glass window through which light falls. The falloff and blur are determined by the size of the light, the distance to the light and distance from the cookie.

**Analytic (1)**: The cookie has a fixed projection and manual blur and falloff controls.

![cookie_modeAnalytic.jpg](media://5c011f7f-004d-4c27-a5c1-54167983c934)


**Map**

Filename of the projected texture. If you want to control the blur for the projected edge, include the mask into the alpha channel of this map. Otherwise, it will use a white opaque alpha installed on $RMANTREE/lib/textures/white.tex for blurring when Blur is > 0.0.

**Fill Color**

If the texture's tile mode is not repeating, this specifies the color for the region outside of and behind the projected rectangle. When we specify Blur below, the edge of the projected rectangle will be blended with the fill color.

**Width**

Width of the rect which the light is shining through.

**Height**

Height of the rect which the light is shining through.

#### Multiplier

**Density**

Controls the strength of the projected effect.

**Invert**

Specify whether to invert the projected texture before it is applied.

**Intensity**

Global Multiplier for both the diffuse and specular contribution below.

**Diffuse**

Multiplier of this light filter result for the diffuse contribution.

**Specular**

Multiplier of this light filter result for the specular contribution.

#### Projection (For Analytic Mode Only)

**Directional**

When this is on, the texture projects along a direction using the orthographic projection. When it is off, the texture projects using a focal point specified by the Apex.

**Shear X**

Shear the projection along the X axis.

**Shear Y**

Shear the projection along the Y axis.

**Apex**

Distance between the center of cookie and the center of projection. This is only applicable when Directional is off.

**Use Light Direction**

If this is on, the projection direction is determined by the position of the center of the light source. Otherwise, it only follows the orientation of the cookie. WARNING: This does not work with dome and mesh lights.

  


#### Texture Mapping

**Tile Mode**

Specifies how the texture repeats.

- No Repeat (0)
- Edge Extent (1)
- Tile (2)

**Invert U**

Turn this on only if you want to flip the texture from left to right. By default, the orientation of the texture is matching the orientation as it is viewed in an image viewer.

  


**Invert V**

Turn this on only if you want to flip texture from bottom to top. By default, the orientation of the texture is matching the orientation as it is viewed in an image viewer. Note that the light filter already takes into the account of flipping the V direction for the correct default orientation.

  


**Scale U**

Scale of the projected texture in the U direction.

**Scale V**

Scale of the projected texture in the V direction.

**Offset U**

Offset of the projected texture in the U direction.

  


**Offset V**

Offset of the the projected texture in the V direction.

**Use Alpha**  
  
If this is off, your result may not be smooth.

  


**Premultiplied Alpha**  
  
If using a texture with unpremultiplied Alpha, set this to 0 of off for correct behavior.

 

#### Blur (for Analytic Mode Only)

**Blur**

Specify the blur of projected texture from 0-1. This gets multiplied by the blurNear/blurFar interpolation. This blurs between the projected color and the fill color when the texture is not repeating.

**S Blur Mult**

Blur multiplier in S direction.

**T Blur Mult**

Blur multiplier in T direction.

**Blur Near Dist**

Distance from the cookie where the blur interpolation starts.

**Blur Midpoint**

Distance between near and far, where the midValue is located.

**Blur Far Dist**

Distance from the cookie where the blur interpolation ends.

**Blur Near Value**

Blur multiplier where the blur interpolation starts.

**Blur Mid Value**

Blur multiplier in the middle of the blur interpolation.

**Blur Far Value**

Blur multiplier where the blur interpolation ends.

**Blur Exponent**

Power exponent of the blur interpolation.

  


#### Density Falloff (for Analytic Mode Only)

**Density Near Dist**

Distance from the cookie where the density interpolation starts.

**Density Midpoint**

Distance between near and far, where the midValue is located.

**Density Far Dist**

Distance from the cookie where the density interpolation ends.

**Density Near Value**

Density multiplier where the blur interpolation starts.

**Density Mid Value**

Density multiplier in the middle of the density interpolation.

**Density Far Value**

Density multiplier where the blur interpolation ends.

**Density Exponent**

Power exponent of the density interpolation.

  


#### Saturation, Contrast, Tint

**Saturation**

Saturation of the result (0=greyscale,1=normal,>1=boosted colors).

**Midpoint**

Midpoint for the contrast control.

**Contrast**

Contrast control (less than 1 = contrast reduction, larger than 1 = contrast increase).

**White Point**

White point for the contrast control if (contrast > 1.0).

**Tint**

Tint of the resulting color after saturation, contrast and clamp.

#### Combine Mode

Combine Mode

**mult**: The results of all the filters are multiplied together

**max**: The maximum result from all filters is used.This works best for grey scale light filters.

**min**: The minimum result from all filters is used.This works best for grey scale light filters.

**screen**: Similar to the max operation, but it combines gradients in a smoother way. This works best for grey scale light.

Light filters on a light are grouped by their combine mode. Light filters in the same group are executed together and combined by the combine mode.The groups are executed in this order (max, min, screen, and then mult) and are multiplied together, which means a filter that turns things black in the mult group will zero out all other filters.