Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.. Online editions Editor: Rachel Roumeliotis Production Editor: Rachel Steely Proofreader: Rachel
Trang 3HLSL and Pixel Shaders for XAML
Developers
Walt Ritscher
Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo
Trang 4HLSL and Pixel Shaders for XAML Developers
by Walt Ritscher
Copyright © 2012 Walt Ritscher All rights reserved
Printed in the United States of America
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472
O’Reilly books may be purchased for educational, business, or sales promotional use Online editions
Editor: Rachel Roumeliotis
Production Editor: Rachel Steely
Proofreader: Rachel Steely
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrators: Robert Romano and Rebecca Demarest
Revision History for the First Edition:
See http://oreilly.com/catalog/errata.csp?isbn=9781449319847 for release details
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc HLSL and Pixel Shaders for XAML Developers, the image of an American bittern,
and related trade dress are trademarks of O’Reilly Media, Inc
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-tained herein
ISBN: 978-1-449-31984-7
[LSI]
1341330024
Trang 5Table of Contents
Preface ix Foreword xv
1 Shader 101 1
2 Getting Started 11
iii
Trang 6APPENDIX B
Shazzam Settings
Table B-1 Shazzam tags, general and class level
/// A Shazzam XML comment tag Content is ignored by the DirectX compiler
effect name A class named SwirlyEffect is generated from the Swirly.fx file Use the
configured in the Tools panel settings panel Use the <namespace> tag to override the default namespace name
description
target is configured in the Settings panel Use the <target> tag to override the default target
property
Table B-2 Shazzam Tags, parameter level
It is used on a shader input parameter to describe the purpose of the input parameter It causes a tooltip to show in Shazzam for the test control
It provides an initial value for the minimum textbox
It provides an initial value for the maximum textbox
It provides a starting value for the value slider
183
Trang 7About the Author
Walt’s enthusiasm for crafting software interfaces blossomed early Just a few days after discovering how to make pixels move around the screen of a borrowed computer, he was devouring books on the topic of computer graphics and UI design Now he travels the world, speaking at software conferences and teaching a diverse portfolio of pro-gramming topics for corporate clients On the consulting side, he continues to work with customers like Microsoft, HP, Intel, and Intuit and enjoys being part of the Wintellect consultant group Recently, he has entered the video training market pro-ducing NET titles for Lynda.com He writes for several publications including Code Magazine and TechTarget.com His current UI obsession revolves around the Windows 8 Metro, Silverlight, Surface, and WPF APIs You can find his blog at
Shaz-zam WPF Shader utility