zoukankan      html  css  js  c++  java
  • shaderop的定义

    wiki http://en.wikipedia.org/wiki/Shadeop Shadeop is a term used in computer graphics rendering to refer to an atomic, built-in function used in ashader. shadeop 的意思是 计算机图形渲染领域,其实就是renderman, shader 所使用的内建的函数 可以自己写shadeop(个人理解写完以后编译成dso或者dll 2009.10.10) The term is specifically used in the context of shaders written in the RenderMan Shading Language (RSL) for use with RenderMan-compliant renderers. User-defined functions written in RSL are just referred to as "functions". Hence, use of the term mostly serves as a means to distinguish the latter type from built-in type functions. However, RSL allows for binary plugins written in C to be loaded and treated like built-in shadeops. These are commonly referred to as DSO shadeops. Two RenderMan implementations, 3Delight and PhotoRealistic RenderMan, have recently added a new type called RSL plugin shadeop. This type uses a newer C++ API but otherwise can't be distinguished from the older type by a user, when called from within a shader. 用rsl写的函数只是被称为'funtions' shadeop大部分时间指内建的函数。 不过rsl允许使用C语言编写的编译过的plugin作为内建shadeop, 即DSO shadeops. 新的3delight 和prman最近支持C++ API的dso 下面的例子中, ambient(), diffuse(), faceforward(), normalize() and transform() 是内建的shadeop checkerboard()是用户自定义的shadeop plugin "checkerboard"; surface checkmatte(float Ka = 1, Kd = 1;) { normal Nf = faceforward(normalize(N), I); color pattern = checkerboard(transform("object", P)); Oi = Os; Ci = Oi * Cs * pattern * (Ka * ambient() + Kd * diffuse(Nf)); }

  • 相关阅读:
    css div中加入滚动条
    oracle创建表主键触发器
    SQL Server 日志满的处理方法(转)
    Asp.net 设置页面自动刷新
    设置DataGrid可读取中隐藏列数据
    用JavaScript获取Asp.net服务器端控件CheckBoxList的选中值数组(转)
    AutoLISP查询椭圆的相关属性
    AutoLISP查询圆弧的相关属性
    关于性格内向者的10个误解
    AutoLISP查询图元信息
  • 原文地址:https://www.cnblogs.com/rdRoad/p/1592666.html
Copyright © 2011-2022 走看看