Skip to main content
sasikumars93559897
Participant
April 9, 2015
Question

How Function Based Shading is working ??

  • April 9, 2015
  • 1 reply
  • 917 views

The Function Based Shading is the Shading Type 1.Can anybody give the example of Function Based Shading....

This topic has been closed for replies.

1 reply

Participating Frequently
April 9, 2015

Here's an example taken from my Advanced PostScript course. It creates a shaded region by interpolating

among two rows of six samples.

Hope this is useful.

John Deubert

Acumen Training

PostScript & PDF consulting and training

www.acumentraining.com

============== Cut here ================

%!PS

% SH1.ps

% Acumen Training

% Advanced PostScript course

/sinFcn <<

  /FunctionType 0

  /Domain [ 0 1 0 1 ]

  /Range [ 0 1 0 1 0 1 ]

  /BitsPerSample 8

  /Size [ 6 2 ]

  /Encode [ 0 5 0 1 ]

  /DataSource < 00 00 00  96 96 00  F3 F3 00  F3 F3 00  96 96 00 00 00 00

  00 00 00  00 96 96  00 F3 F3  00 F3 F3  00 96 96 00 00 00

  >

  /Decode [ 0 1 0 1 0 1]

>> def

/TestShade <<

  /ShadingType 1

  /ColorSpace /DeviceRGB

  /Domain [ 0 1 0 1]

  /Matrix [ 288 0 0 288 0 0]

  /Function sinFcn

>> def

0 0 288 288 rectclip

TestShade shfill

showpage