• Home
  • Raw
  • Download

Lines Matching refs:norm

194 static inline void norm_to_rgb(SkBitmap* bm, int x, int y, const SkVector3& norm) {  in norm_to_rgb()  argument
195 SkASSERT(SkScalarNearlyEqual(norm.length(), 1.0f)); in norm_to_rgb()
196 unsigned char r = static_cast<unsigned char>((0.5f * norm.fX + 0.5f) * 255); in norm_to_rgb()
197 unsigned char g = static_cast<unsigned char>((-0.5f * norm.fY + 0.5f) * 255); in norm_to_rgb()
198 unsigned char b = static_cast<unsigned char>((0.5f * norm.fZ + 0.5f) * 255); in norm_to_rgb()
207 SkVector3 norm; in create_hemi_normal_map() local
211 norm.fX = (x + 0.5f - center.fX) / halfSize.fX; in create_hemi_normal_map()
212 norm.fY = (y + 0.5f - center.fY) / halfSize.fY; in create_hemi_normal_map()
214 SkScalar tmp = norm.fX * norm.fX + norm.fY * norm.fY; in create_hemi_normal_map()
216 norm.set(0.0f, 0.0f, 1.0f); in create_hemi_normal_map()
218 norm.fZ = sqrtf(1.0f - tmp); in create_hemi_normal_map()
221 norm_to_rgb(bm, x, y, norm); in create_hemi_normal_map()
233 SkPoint3 norm; in create_frustum_normal_map() local
242 norm.set(0.0f, 0.0f, 1.0f); in create_frustum_normal_map()
249 norm = locX >= locY ? right : down; // LR corner in create_frustum_normal_map()
251 norm = locX > -locY ? right : up; // UR corner in create_frustum_normal_map()
255 norm = -locX > locY ? left : down; // LL corner in create_frustum_normal_map()
257 norm = locX > locY ? up : left; // UL corner in create_frustum_normal_map()
262 norm_to_rgb(bm, x, y, norm); in create_frustum_normal_map()
273 SkPoint3 norm; in create_tetra_normal_map() local
285 norm = locX >= locY ? rightUp : down; // LR corner in create_tetra_normal_map()
287 norm = rightUp; in create_tetra_normal_map()
291 norm = -locX > locY ? leftUp : down; // LL corner in create_tetra_normal_map()
293 norm = leftUp; in create_tetra_normal_map()
297 norm_to_rgb(bm, x, y, norm); in create_tetra_normal_map()